Skip to content

test: add unit tests for FrameTracer and DivergenceDetector (#208)#223

Open
acailic wants to merge 1 commit into
mainfrom
test/issue-208-frame-tracer-divergence-detector
Open

test: add unit tests for FrameTracer and DivergenceDetector (#208)#223
acailic wants to merge 1 commit into
mainfrom
test/issue-208-frame-tracer-divergence-detector

Conversation

@acailic

@acailic acailic commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds tests/test_frame_tracer.py — 70 tests covering TokenUsage, ExceptionInfo, FrameEvent, FrameLifetimeTrace, build_frame_tree, get_frame_by_id, depth/name filters, get_cost_breakdown, FrameCaptureContext, capture_function_call decorator, _serialize_value, and to_dict/from_dict round-trip
  • Adds tests/test_divergence_detector.py — 36 tests covering enums, DivergencePoint, SessionComparison, detect_divergences, compare_session_structures, analyze_temporal_divergence, analyze_behavioral_divergence, and all internal scoring/severity helpers
  • 106 tests total, all passing in 0.59s

Test plan

  • python3 -m pytest tests/test_frame_tracer.py tests/test_divergence_detector.py -q → 106 passed
  • ruff check → 0 errors

Closes #208

🤖 Generated with Claude Code

Adds 106 unit tests covering zero-coverage modules:
- tests/test_frame_tracer.py: TokenUsage, ExceptionInfo, FrameEvent,
  FrameLifetimeTrace, build_frame_tree, get_frame_by_id, depth/name
  filters, cost breakdown, FrameCaptureContext, capture_function_call
  decorator, _serialize_value, and to_dict/from_dict round-trip
- tests/test_divergence_detector.py: enums, DivergencePoint,
  SessionComparison, detect_divergences, compare_session_structures,
  analyze_temporal_divergence, analyze_behavioral_divergence, and all
  internal scoring/severity helpers

Closes #208

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add unit tests for FrameTracer and DivergenceDetector (zero coverage)

1 participant