Commit 2235438
Add comprehensive tests for core.py module
- Created 49 comprehensive tests covering all major functions and classes
- Test coverage for core.py: 42% → 92% (+50pp improvement)
- Overall test coverage: 61% → 84% (+23pp improvement)
Test coverage includes:
- calculate_llm_cost() with various scenarios (custom pricing, old naming, no pricing, zero tokens)
- detect_ai_provider() for all major AI providers
- estimate_tokens() token estimation
- WorkflowCostTracker class (initialize, add costs, tracking, deletion)
- ConversationTracker class (start, add turns, stats, cost tracking)
- Last9GenAI main class (all 13 public methods)
- create_llm_span() and create_tool_span() convenience functions
All 106 tests passing (100% pass rate)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent bda85c6 commit 2235438
1 file changed
Lines changed: 690 additions & 184 deletions
0 commit comments