screen-locker/screen_locker/tests
Krzysztof kuhy Rudnicki 7eca3f4145
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
Tests / test (3.10) (push) Has been cancelled
Tests / test (3.11) (push) Has been cancelled
Tests / test (3.12) (push) Has been cancelled
Pin the StrongLifts week-scan tests to a fixed Wednesday
test_fills_gap_for_past_week_day and test_rescanning_an_already_filled_day
built their fixture date as date.today() - 1 day and asserted it was "this
week". _try_fill_stronglifts_for_week accepts week_start <= entry <= today,
and on a Monday week_start IS today — so yesterday (Sunday) belongs to the
previous ISO week and both tests failed. They passed Tue-Sun and failed every
Monday, which is exactly when they were noticed: they blocked an unrelated
push.

Pin "now" to Wednesday 2026-07-22 with the _FakeDatetime pattern already used
in test_status_part2, so the fixture day is Tuesday — comfortably inside the
week whatever day the suite actually runs. Verified under faketime on Mon,
Tue, Fri and Sun: 8 passed each time.

The neighbouring "last week" case needs no pinning: 8 days back always
precedes a week start, on any weekday.

Also covers the remaining branch in _try_fill_stronglifts_for_week — an
in-week JSON that fails content validation must not be written. It was
unreachable on a Monday, so the file had never hit 100% on one; the suite is
now 859 passed / 100% coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 08:57:25 +02:00
..
__init__.py Add comprehensive tests for stockfish_analysis (100% coverage) 2025-12-02 22:58:06 +01: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
conftest.py Redesign manual-workout form: two-column grid, drop phone-only fields 2026-07-13 10:09:18 +02:00
test_adb_and_phone.py Restore consistency with WORKOUT_APP_JSON_REMOTES rename in _constants.py 2026-06-22 07:05:07 +02:00
test_compliance_state_part2.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_compliance_state.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +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.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +02:00
test_extra_benefits.py Add manual (unverified) workout logging with evidence form 2026-07-05 20:08:52 +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.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +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.py Retry sync past the boot/resume network race, and stop blaming the token 2026-07-20 08:46:37 +02:00
test_manual_sync.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
test_manual_workout_dialog.py Redesign manual-workout form: two-column grid, drop phone-only fields 2026-07-13 10:09:18 +02:00
test_manual_workout_features.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
test_manual_workout_status_view.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
test_manual_workout.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +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_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 chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_phone_verification_part3.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_phone_verification_part4.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +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_runnerup_verification_part1.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_runnerup_verification_part2.py Make Check Phone week-aware; add RunnerUp GPS tolerance; fix CLI weekly count 2026-07-18 06:55:55 +02:00
test_runnerup_verification_part3.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
test_runnerup_verification_part4.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_runnerup_verification_part5.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +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 Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
test_screen_lock_coverage_part2.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +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 refactor: enforce 400-line file limit with pre-commit hook and split outliers 2026-05-28 21:19:18 +02:00
test_shutdown_part3.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_shutdown_part4.py Add auto-fill RunnerUp scan, carrot bonuses, and --status interface 2026-06-28 08:08:35 +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.py refactor: enforce 400-line file limit with pre-commit hook and split outliers 2026-05-28 21:19:18 +02:00
test_sick_tracker.py chore: set up as standalone repo 2026-05-28 07:43:06 +02:00
test_status_data.py Fix CI-only failure: avoid dating a test entry "today" without HMAC 2026-07-19 13:56:44 +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_view_part2.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_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.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
test_status.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
test_sync_fixtures.py Retry sync past the boot/resume network race, and stop blaming the token 2026-07-20 08:46:37 +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_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 chore: set up as standalone repo 2026-05-28 07:43:06 +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.py Fix silent skip-credit bypass; replace with weekly shutdown-time bonus 2026-07-03 15:27:08 +02:00
test_vt_switching.py Migrate to the shared gatelock backend 2026-06-21 20:11:16 +02:00
test_wake_shutdown.py chore: set up as standalone repo 2026-05-28 07:43:06 +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.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
test_weekly_logic_part2.py Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
test_weekly_logic.py Give manual workouts full effect parity; raise minimum to 5, double budget 2026-07-19 13:50:39 +02:00
test_workout_sync.py Manual-workout phone sync P2: PC ingestion (multi-record + manual branch) 2026-07-13 11:15:07 +02:00