Skip to content

Rename the hand-computed validation tests - #32

Merged
MaxGhenis merged 2 commits into
mainfrom
rename-hand-computed-tests
Dec 1, 2026
Merged

MaxGhenis merged 2 commits into
mainfrom
rename-hand-computed-tests

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Agent-written for Max, by Claude Code for Max Ghenis.

Fixes #21.

What this changes

policyengine_nz/tests/validation/test_against_treasury.py holds hand-computed income tax, Family Tax Credit and Best Start cases for 2023-24 and some loose smoke checks. None of them compares the model with Treasury output, as its docstrings have said since #7. This PR renames the file to test_hand_computed_cases.py and its first class from TestTreasuryValidation to TestHandComputedCases, and adds a changelog fragment. The test code is otherwise unchanged; Git records the file as a rename.

#7, #9 and #12, which also edited the file, have all merged, and no open PR touches it. A search of main finds no other reference to either name, in docs, CI or code.

Tests

  • On main at 9fb45cf with this change, the 11 tests in policyengine_nz/tests/validation/ pass, and pytest collects the five methods under TestHandComputedCases.
  • Ruff's format check leaves the renamed file as it is.

Revisions

  • First version (241edaf).
  • Round 1 of the review, at 241edaf, found that the changelog fragment called all the module's cases hand-computed. c5898d0 rewrites it to say the module holds hand-computed cases and smoke checks.

axiom: no RuleSpec change (test file rename and changelog)

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits December 1, 2026 00:13
policyengine_nz/tests/validation/test_against_treasury.py holds
hand-computed income tax, Family Tax Credit and Best Start cases and
loose smoke checks; none compares the model with Treasury output. The
file becomes test_hand_computed_cases.py and its first class
TestHandComputedCases. Nothing else refers to either name.

Fixes #21.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The changelog fragment said the module's cases are hand-computed; it
also holds smoke checks (round 1 of the review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Agent-written for Max, by Claude Code for Max Ghenis.

Answer to the first review, which requested changes at 241edaf with one P1: the changelog fragment said the module's cases are hand-computed, though it also holds smoke checks. c5898d0 rewrites the fragment to say the module holds hand-computed cases and smoke checks, and that none of them compares the model with Treasury output. The description's Revisions section records the change. Round 2 can start from c5898d0.

@MaxGhenis
MaxGhenis merged commit d8ee910 into main Dec 1, 2026
11 checks passed
@MaxGhenis
MaxGhenis deleted the rename-hand-computed-tests branch December 1, 2026 05:32
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.

Rename tests/validation/test_against_treasury.py to match what it tests

1 participant