Skip to content

Make the test suite pass the same way on every machine - #257

Merged
gbradham merged 1 commit into
mainfrom
claude/ll-41-test-portability
Nov 28, 2026
Merged

gbradham merged 1 commit into
mainfrom
claude/ll-41-test-portability

Conversation

@gbradham

Copy link
Copy Markdown
Member

Fixes LL-41. A test that passes or fails depending on the machine hides real failures. This PR fixes the four ways that happened.

Changes

  • Flaky repaint test. test_a_whole_session_pulse_train_repaints_quickly has a 50 ms wall-clock limit. On 2026-11-27 it took 51 ms on ubuntu-22.04 and passed on re-run, with nothing changed. It's now marked slow, so CI leaves it out like the other timing tests. It still runs with -m slow.
  • Font-dependent test. test_run_clock_uses_the_ui_font_with_steady_digits now skips, with the reason, when none of the clock's fonts (Helvetica Neue, Segoe UI, Roboto) is installed and the fallback font has proportional digits. Wherever it passes today, it still runs.
  • Headless by default. The root conftest.py sets QT_QPA_PLATFORM=offscreen unless it's already set, so pytest without the variable no longer runs the GUI tests against a real display.
  • CI on merge commits. ci.yml skipped "Merge pull request" pushes. When several PRs merged into dev one after another, each had passed against an older dev, and nothing tested the combined result. The skip is gone, and cancel-in-progress still drops runs that a newer push replaces.
  • CONTRIBUTING. Lists the Linux system packages, the in-repo plugin installs (after uv sync), and the one command that runs the suite: uv run --no-sync pytest -m "not slow".

Testing

  • The changed test files pass with QT_QPA_PLATFORM unset on macOS: 95 passed, plus 1 passed for -m slow.
  • ruff and black --check are clean.
  • The font skip only triggers on a machine without those fonts. It isn't exercised on macOS.

Follow-up

dev has a different CONTRIBUTING (the branch rule), so merging main back into dev may need a small conflict resolution there.

- Mark the 50 ms repaint test slow. It failed once on a shared Ubuntu runner
  with nothing changed, and CI already leaves slow timing tests out.
- Skip the run-clock digit test, with the reason, when none of the clock's
  fonts is installed and the fallback has proportional digits.
- Run headless by default: the root conftest sets QT_QPA_PLATFORM=offscreen
  unless it is already set.
- Stop skipping CI on "Merge pull request" commits. When several PRs merge
  one after another, the combined result was never tested.
- CONTRIBUTING lists the Linux system packages, the plugin installs, and
  the one command that runs the suite.

Fixes LL-41.
@gbradham
gbradham merged commit 3279803 into main Nov 28, 2026
4 checks passed
@gbradham
gbradham deleted the claude/ll-41-test-portability branch November 28, 2026 20:48
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.

1 participant