testsAndMisc/docs/superpowers/contracts/wsg-grabber-test-review-split-2026-08-16.json
Krzysztof kuhy Rudnicki e03fbd17e9 Split wsg_grabber/tests/test_review.py under the 250-line cap
Split along the same seams the source took: test_review_render.py covers what
now lives in review._render, test_review_undo.py covers review._undo.

The two fixture builders they share moved into the existing conftest.py rather
than a _helpers.py -- the name-tests-test hook requires everything else under
tests/ to be named test_*.py, and syncyomi_guard/tests/conftest.py is the
precedent for plain shared builders living there. Sharing beats copying: jscpd
fails the commit above 2% duplication and this repo already carries four partN
test files.

277 passed, the same count as before, so nothing was dropped. Two intermediate
runs caught real NameErrors from imports the extracted module needed.

test_review.py 297 -> 112, test_review_render.py 102, test_review_undo.py 79.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-16 16:24:48 +02:00

18 lines
1.3 KiB
JSON

{
"title": "Split wsg_grabber/tests/test_review.py under the 250-line cap",
"objective": "Bring python_pkg/wsg_grabber/tests/test_review.py (297 lines) under the repo-wide 250-line cap by splitting it along the same seams the source was split on, without losing or weakening a single test.",
"acceptance_criteria": [
"test_review.py, test_review_render.py, test_review_undo.py and conftest.py are each at most 250 lines.",
"The wsg_grabber suite still reports exactly 277 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the wsg_grabber source modules.",
"No test body is modified, weakened, or deleted; the split only moves whole test functions and shares their two fixture builders.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts.",
"Splitting the other wsg_grabber test files -- separate commits.",
"Converting the shared builders into pytest fixtures, which would change every call site."
],
"verifier": "python3 -m pytest python_pkg/wsg_grabber/tests/ -q (expects exactly 277 passed), plus pre-commit run --files on the four touched files, plus bash ~/utils/scripts/check_file_length.sh --all for the cap."
}