testsAndMisc/python_pkg/brother_printer/tests
Krzysztof kuhy Rudnicki 69242e4bb3
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
Python tests / test (push) Waiting to run
fix(brother-printer): split oversized files, fix order-dependent entry test
a12e696 turned CI red two ways, both missed locally because the suite was
run for the brother_printer package alone while CI runs everything in a
random order.

The repo caps Python files at 500 lines and cups_service.py had reached
659. Rather than cut it arbitrarily, extract consumable life tracking -
page counters, replacement baselines, the scale migration, dropped-page
detection - into consumables.py. The seam is real: none of it depends on
CUPS service control, and cups_service needs only estimate_consumable_life
for its fallback query, so the dependency runs one way. The test files are
split along the same seams.

test_main_entry passed or failed depending on execution order: runpy warns
when the target module is already in sys.modules, a sibling test imports
it, and pytest is configured with filterwarnings=error. Drop the module
before running it so the test no longer depends on who ran first.

Structural only; no behaviour change. 692 tests, 100% branch coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RG3eEn8rwZbcXaJrKJxdv8
2026-07-17 15:06:25 +02:00
..
__init__.py test: achieve 100% branch coverage across all python_pkg packages 2026-03-21 17:51:36 +01:00
test_check_brother_printer.py fix(brother-printer): report the truth, not invented status codes 2026-07-17 14:49:23 +02:00
test_constants.py fix(brother-printer): report the truth, not invented status codes 2026-07-17 14:49:23 +02:00
test_consumables_part2.py fix(brother-printer): split oversized files, fix order-dependent entry test 2026-07-17 15:06:25 +02:00
test_consumables.py fix(brother-printer): split oversized files, fix order-dependent entry test 2026-07-17 15:06:25 +02:00
test_cups_queue_part2.py Reduce per-file-ignores by fixing lint violations across codebase 2026-03-25 18:58:05 +01:00
test_cups_queue_part3.py test: achieve 100% branch coverage across all python_pkg packages 2026-03-21 17:51:36 +01:00
test_cups_queue.py Reduce per-file-ignores by fixing lint violations across codebase 2026-03-25 18:58:05 +01:00
test_cups_service_part2.py fix(brother-printer): report the truth, not invented status codes 2026-07-17 14:49:23 +02:00
test_cups_service_part3.py fix(brother-printer): report the truth, not invented status codes 2026-07-17 14:49:23 +02:00
test_cups_service_part4.py fix(brother-printer): split oversized files, fix order-dependent entry test 2026-07-17 15:06:25 +02:00
test_cups_service.py fix(brother-printer): split oversized files, fix order-dependent entry test 2026-07-17 15:06:25 +02:00
test_data_classes.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
test_display_part2.py Reduce per-file-ignores by fixing lint violations across codebase 2026-03-25 18:58:05 +01:00
test_display_part3.py fix(brother-printer): split oversized files, fix order-dependent entry test 2026-07-17 15:06:25 +02:00
test_display.py fix(brother-printer): split oversized files, fix order-dependent entry test 2026-07-17 15:06:25 +02:00
test_main_entry.py fix(brother-printer): split oversized files, fix order-dependent entry test 2026-07-17 15:06:25 +02:00
test_network_query.py Reduce per-file-ignores by fixing lint violations across codebase 2026-03-25 18:58:05 +01:00
test_query.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
test_usb_query_part2.py fix(brother-printer): split oversized files, fix order-dependent entry test 2026-07-17 15:06:25 +02:00
test_usb_query.py fix(brother-printer): split oversized files, fix order-dependent entry test 2026-07-17 15:06:25 +02:00