screen-locker/screen_locker/tests
Krzysztof kuhy Rudnicki bdc405c8c9 Split _shutdown, _phone_verification and _status_data
Six new modules, all composed or re-exported so no caller changes:

  _shutdown.py (384)          -> _shutdown_sick_state.py  SickDayStateMixin
                                 _wake_alarm.py           WakeAlarmMixin
  _phone_verification.py (380)-> _adb_transport.py        AdbTransportMixin
                                 _http_workout_fetch.py   HttpWorkoutFetchMixin
  _status_data.py (370)       -> _status_types.py         the 7 dataclasses
                                 _status_projection.py    shutdown projection
                                                          + format_summary_line

Moving a name means moving where it is *read*, so 30-odd mock patch targets
move with it. Most importantly conftest.py's autouse _block_real_network
fixture: ruff correctly dropped the now-unused `socket` import from
_phone_verification, which silently removed the guard's target and would have
let subnet probes reach the real network. It now blocks socket in both modules
that actually own the probes, and both targets are asserted to exist.

976 tests pass at 100% branch coverage; pylint 8.70 -> 8.71; `screen_lock
--status` renders the real week unchanged. File-length gate: 41 -> 35.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EveB813BQ8abAP68VSqZ5Y
2026-08-15 20:11:28 +02:00
..
fixtures Add sync-status card and duration-threshold fixture 2026-08-15 18:41:31 +02:00
__init__.py Add comprehensive tests for stockfish_analysis (100% coverage) 2025-12-02 22:58:06 +01:00
_gatelock_fixtures.py Migrate screen_locker to gatelock v0.2.0 per-output locking 2026-07-25 16:26:39 +02:00
_locker_factories.py Split screen_lock.py under the 250-line cap 2026-08-15 19:01:18 +02:00
_status_view_helpers.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
_unlock_helpers.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
_workout_sync_fixtures.py Let the PC see phone workouts again, and stop losing progression on reinstall 2026-08-10 14:39:02 +02:00
conftest.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_adb_and_phone_part2.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_adb_and_phone.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_cli.py Split screen_lock.py under the 250-line cap 2026-08-15 19:01:18 +02:00
test_compliance_state_part2.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00
test_compliance_state_part3.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_compliance_state_part4.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_compliance_state.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00
test_duration_threshold_fixture.py Add sync-status card and duration-threshold fixture 2026-08-15 18:41:31 +02:00
test_early_bird_part2.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
test_early_bird_part3.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00
test_early_bird.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_extra_benefits_part2.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_extra_benefits.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_focus_and_scroll.py Stop the lock screen scrolling itself, and make every screen fit 768px 2026-08-03 15:57:48 +02:00
test_heat_skip.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_init_and_log_part2.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
test_init_and_log_part3.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_init_and_log.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00
test_log_io.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
test_log_mixin_chokepoint.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
test_manual_push_part2.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_manual_push.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_manual_sync_part2.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_manual_sync_part3.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_manual_sync.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_manual_workout_dialog.py Make the lock overlay's sport selector usable, and focus its form fields 2026-07-26 15:08:08 +02:00
test_manual_workout_features_part2.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_manual_workout_features_part3.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_manual_workout_features.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_manual_workout_part2.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_manual_workout_status_view.py Wire gatelock.LockConfig into every window, not just the lock overlay 2026-07-21 21:45:59 +02:00
test_manual_workout.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_mcp.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
test_no_popup_widgets.py Make the lock overlay's sport selector usable, and focus its form fields 2026-07-26 15:08:08 +02:00
test_phone_check_unlock_part2.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_phone_check_unlock_part3.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_phone_verification_part2.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_phone_verification_part3.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_phone_verification_part4.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_phone_verification_part5.py Pin the StrongLifts week-scan tests to a fixed Wednesday 2026-07-20 08:57:25 +02:00
test_phone_verification_part6.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_phone_verification_part7.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_phone_verification_part8.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_runnerup_verification_part1.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_runnerup_verification_part2.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_runnerup_verification_part3.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_runnerup_verification_part4.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_runnerup_verification_part5.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_runnerup_verification_part6.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_runnerup_verification_part7.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_runnerup_verification_part8.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_runnerup_verification_part9.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_runnerup_verification_part10.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_runnerup_verification_part11.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_runnerup_verification_part12.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_runnerup_verification_part13.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_runnerup_verification_part14.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_scheduled_skip.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_screen_lock_coverage_part1.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_screen_lock_coverage_part2.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_screen_lock_coverage_part3.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_screen_lock_coverage_part4.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_shutdown_base.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_shutdown_part2.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_shutdown_part3.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_shutdown_part4.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_shutdown_part5.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_shutdown_part6.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_sick_features_part2.py refactor: enforce 400-line file limit with pre-commit hook and split outliers 2026-05-28 21:19:18 +02:00
test_sick_features_part3.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_sick_features.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_sick_tracker_part2.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_sick_tracker.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_status_data_part2.py Split _compliance_state.py and status_view.py 2026-08-15 20:01:12 +02:00
test_status_data_part3.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_status_data_part4.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_status_data.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_status_part2.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
test_status_part3.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_status_view_part2.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_status_view_part3.py Make Check Phone week-aware; add RunnerUp GPS tolerance; fix CLI weekly count 2026-07-18 06:55:55 +02:00
test_status_view_part4.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_status_view_part5.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_status_view_part6.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_status_view_part7.py Split the last 8 test modules; scope pylint's test-inherent checks 2026-08-15 19:40:32 +02:00
test_status_view.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_status.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_surface_fanout.py Migrate screen_locker to gatelock v0.2.0 per-output locking 2026-07-25 16:26:39 +02:00
test_sync_fixtures.py Push under a persisted per-install uuid, not a fixed role id 2026-08-09 17:31:15 +02:00
test_sync_retry.py Retry sync past the boot/resume network race, and stop blaming the token 2026-07-20 08:46:37 +02:00
test_sync_status.py Show which sync backend the PC uses in the status window 2026-08-09 21:20:02 +02:00
test_temperature.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_time_check.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_ui_and_timers_part2.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_ui_and_timers.py Migrate screen_locker to gatelock v0.2.0 per-output locking 2026-07-25 16:26:39 +02:00
test_ui_flows_part2.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_verify_workout_part2.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_verify_workout.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_vt_switching.py Migrate to the shared gatelock backend 2026-06-21 20:11:16 +02:00
test_wake_shutdown.py Split _shutdown, _phone_verification and _status_data 2026-08-15 20:11:28 +02:00
test_wake_skip.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +02:00
test_wake_state.py fix: apply pre-commit formatting fixes to unblock CI 2026-05-28 20:59:35 +02:00
test_weekly_check_part2.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_weekly_check.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_weekly_logic_part2.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_weekly_logic_part3.py Split 10 more test modules under the 250-line cap 2026-08-15 19:22:00 +02:00
test_weekly_logic_part4.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_weekly_logic.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_workout_sync_part2.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_workout_sync_part3.py Let the PC see phone workouts again, and stop losing progression on reinstall 2026-08-10 14:39:02 +02:00
test_workout_sync_part4.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00
test_workout_sync_part5.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_workout_sync_part6.py Split 12 more test modules under the 250-line cap 2026-08-15 19:34:59 +02:00
test_workout_sync.py Split 13 test modules under the cap; document their test methods 2026-08-15 19:16:18 +02:00