Skip to content

Tests: keep reset countdowns off a minute boundary (fixes windows-11-arm) - #20

Merged
nstarke merged 1 commit into
mainfrom
fix/flaky-reset-countdown-tests
Oct 25, 2026
Merged

nstarke merged 1 commit into
mainfrom
fix/flaky-reset-countdown-tests

Conversation

@nick-alephvoid

Copy link
Copy Markdown
Contributor

Summary

test_tray_render_after_fetch failed on the new windows-11-arm, 3.11 leg after #18 was merged. sample_data() set the reset to exactly now + 3h and the test expected 2h 59m. That only passes if the clock has ticked between building the data and rendering it. On Windows on Arm with Python 3.11 the clock is coarse enough that both reads return the same instant, so the countdown floors to 3h 00m. test_widget.py had the same pattern with 5h. Both now put the reset half a minute short of the hour, as test_app.py already does.

Separately, the ubuntu-26.04, 3.13 failure in the same run was apt-get update getting a 403 from packages.microsoft.com, a runner problem unrelated to the code.

Test plan

  • pytest tests/test_tray.py tests/test_widget.py passes locally
  • CI passes on windows-11-arm

🤖 Generated with Claude Code

sample_data() and the widget test put the reset exactly 3h / 5h from now and expected
"2h 59m" / "4h 59m", which relies on the clock having ticked between building the data
and rendering it. On Windows on Arm with Python 3.11 the clock is coarse enough that
both reads return the same instant, the countdown floors to "3h 00m", and
test_tray_render_after_fetch failed. Put the resets half a minute short instead, as
test_app.py already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nstarke
nstarke merged commit a2ebd43 into main Oct 25, 2026
31 checks passed
@nstarke
nstarke deleted the fix/flaky-reset-countdown-tests branch October 25, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants