Give gatelock's test job a display, so its real-Tk tests actually run

Headless, the viewport, fit-check and keyboard tests skip -- 25 of them --
and take their coverage with them, which is why this job went red the moment
they landed: 100% is the bar and _fitcheck drops to 47%, _keyboard to 18%.

Skipping is the worse half. These tests exist because Tk's own focus
delivery and canvas scrolling cannot be mocked -- mocking them is exactly how
a viewport that scrolled itself passed every check for a week -- so a green
run that skipped them would be reporting nothing about the thing they guard.
xvfb-run gives the runner a display, which is what every local run already
used.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BsXnTHyuuCUZsqetTaajcF
This commit is contained in:
Krzysztof Rudnicki 2026-08-03 18:29:38 +02:00
parent 02e2e13790
commit 161eccd9a5

View File

@ -29,5 +29,13 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt run: pip install -r requirements.txt
# The viewport, fit-check and keyboard tests drive real Tk: focus
# delivery, canvas scrolling and widget heights are Tk's own behaviour,
# and mocking them is what let a viewport that scrolled itself pass
# every check for a week. Headless they skip, silently taking coverage
# with them -- so the runner gets a display instead.
- name: Install a virtual X display
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Run tests with coverage - name: Run tests with coverage
run: python -m pytest -v run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -v