mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 16:34:06 +01:00
test_display.py 363 -> 204, with the supply maths and its display going to test_supply_levels.py. test_usb_query.py 328 -> 126, with the retry and sequencing tests going to test_usb_query_sequence.py. That removed the last reader of the six _supply names through display, so display.py's __all__ shrinks to the two public entry points and the stale comment about tests reaching them there is gone. Checked by grep across python_pkg and an import-time attribute probe, not by the suite. The first run after the usb_query split reported 393: TestParsePagecount sat between the two moved classes and travelled with them. Fixed. Pass count is 402 before and after. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
20 lines
1.9 KiB
JSON
20 lines
1.9 KiB
JSON
{
|
|
"title": "Split the brother_printer display and usb_query test modules under the 250-line cap",
|
|
"objective": "Bring test_display.py (363 lines) and test_usb_query.py (328) under the repo-wide 250-line cap by partitioning them at class boundaries, and retire display.py's now-dead __all__ re-export block once no test reaches the supply helpers through it.",
|
|
"acceptance_criteria": [
|
|
"test_display.py, test_supply_levels.py, test_usb_query.py and test_usb_query_sequence.py are each at most 250 lines.",
|
|
"The brother_printer suite still reports exactly 402 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 brother_printer source modules.",
|
|
"display.py keeps every name that test_display.py and test_display_part2.py patch on it as a real module attribute, verified by an import-time probe rather than inferred from a green run.",
|
|
"The six _supply names are removed from display.py's __all__ only after confirming by grep that no source module and no test still imports them through display.",
|
|
"No assertion is changed and no test is deleted, skipped or weakened; whole classes move verbatim and only the import blocks are adjusted.",
|
|
"No suppression is added and no coverage exclusion is introduced."
|
|
],
|
|
"out_of_scope": [
|
|
"Changing what any test asserts.",
|
|
"Moving _display_supply_levels or _display_supply_warnings out of display.py: test_display_part2.py patches _display_supply_levels there.",
|
|
"Splitting test_check_brother_printer.py or the consumables pair, which are separate commits."
|
|
],
|
|
"verifier": "PYTHONPATH=. python3 -m pytest python_pkg/brother_printer/tests -q (expects exactly 402 passed), plus the display attribute probe, plus pre-commit run --files on the touched files, plus bash ~/utils/scripts/check_file_length.sh --all for the cap."
|
|
}
|