mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-10 19:27:14 +01:00
Give the test job a display, so the real-Tk tests run instead of failing
This job has been red since the keyboard tests landed: they drive real Tk -- widget heights and the focus ring come from the font engine, and no mock can answer what they ask -- and a runner has no X display, so they failed with "no display name and no $DISPLAY" rather than skipping. Thirteen tests, including the two that assert the gate fits 1366x768, were reporting nothing about the code. xvfb-run gives them the display they need, which is what every local run of these tests 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:
parent
df5916f616
commit
a737843503
9
.github/workflows/python-tests.yml
vendored
9
.github/workflows/python-tests.yml
vendored
@ -24,5 +24,12 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
# The gate's keyboard and layout tests drive real Tk: widget heights and
|
||||
# the focus ring come from the font engine, and no mock can answer what
|
||||
# they ask. Without a display they do not skip -- they fail, which is how
|
||||
# this job stayed red while the tests themselves were fine.
|
||||
- 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user