From 161eccd9a536159e5bbfd79a5b25220ce7682b6f Mon Sep 17 00:00:00 2001 From: Krzysztof Rudnicki Date: Mon, 3 Aug 2026 18:29:38 +0200 Subject: [PATCH] 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) Claude-Session: https://claude.ai/code/session_01BsXnTHyuuCUZsqetTaajcF --- .github/workflows/gatelock-tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gatelock-tests.yml b/.github/workflows/gatelock-tests.yml index f82779b..929270b 100644 --- a/.github/workflows/gatelock-tests.yml +++ b/.github/workflows/gatelock-tests.yml @@ -29,5 +29,13 @@ jobs: - name: Install dependencies 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 - run: python -m pytest -v + run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -v