Skip to content

Conversation

@MaxGhenis
Copy link
Contributor

@MaxGhenis MaxGhenis commented Jan 31, 2026

Summary

Add # pragma: no cover only to code that would cause problems if tested in unit tests.

Changes (6 files)

Microsim-specific branches

  • county.py: is_over_dataset check - only executes during microsimulation
  • zip_code.py: has_axes check - only executes during microsimulation

Behavioral response code

Code that requires reform scenarios with simulation branching - cannot be unit tested without setting up baseline/reform comparison:

  • labor_supply_behavioral_response.py
  • relative_income_change.py
  • relative_wage_change.py
  • capital_gains_responses.py

Test plan

  • All existing tests pass
  • Only code that would fail/error if unit tested is marked

🤖 Generated with Claude Code

Mark only code that would cause problems if tested in unit tests:

1. **Microsim-specific branches** (2 files):
   - county.py: is_over_dataset check
   - zip_code.py: has_axes check

2. **Behavioral response code** (4 files):
   Requires reform scenarios with simulation branching - cannot
   be tested without setting up baseline/reform comparison:
   - labor_supply_behavioral_response.py
   - relative_income_change.py
   - relative_wage_change.py
   - capital_gains_responses.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@MaxGhenis MaxGhenis force-pushed the coverage-100-pragmas branch from 6e37f06 to 31d097e Compare January 31, 2026 18:41
Add guidelines to CONTRIBUTING.md and CLAUDE.md specifying that
# pragma: no cover should only be used for:
1. Microsim-specific branches (is_over_dataset, has_axes)
2. Behavioral response code requiring simulation branching

Co-Authored-By: Claude Opus 4.5 <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.

2 participants