Skip to content

test: skip tkinter scheduler tests on PyPy (all platforms)#760

Merged
dbrattli merged 2 commits intomasterfrom
fix/tkinter-test-skip-pypy-linux
Apr 17, 2026
Merged

test: skip tkinter scheduler tests on PyPy (all platforms)#760
dbrattli merged 2 commits intomasterfrom
fix/tkinter-test-skip-pypy-linux

Conversation

@dbrattli
Copy link
Copy Markdown
Collaborator

Summary

  • The module-scope tkinter.Tk() in test_tkinterscheduler.py triggers a PyPy interpreter-shutdown crash: _tkinter/app.py __del__threading.notify_allFatal Python error: Aborted. Inside an xdist worker this kills the worker and fails whichever unrelated test it was running.
  • The existing skip guard covered only macOS+PyPy. The same failure now surfaces on Linux+PyPy (observed on [Repo Assist] fix(operators): forward scheduler in pairwise, to_marbles, delay_with_mapper #757 CI, cascaded into cancelling the Windows and macOS PyPy jobs on the same run).
  • Extend the skip guard to all PyPy platforms.

Example of the failure (from #757's run):

Fatal Python error: Aborted
  File \".../pypy3.10/_tkinter/app.py\", line 169 in __del__
  File \".../pypy3.10/threading.py\", line 389 in notify_all
  File \".../pypy3.10/threading.py\", line 568 in set
  File \".../xdist/remote.py\", line 100 in lock
  ...
[gw1] node down: Not properly terminated
FAILED tests/test_observable/test_case.py::TestCase::test_case_three

test_case_three has nothing to do with tkinter — it just happened to be on the worker when tkinter's finalizer aborted.

Test plan

  • CI PyPy-3.10 (ubuntu) job passes without Fatal Python error: Aborted.
  • CI PyPy-3.10 (macos) job still passes (same skip still applies).
  • CI CPython jobs unchanged — pytest.importorskip(\"tkinter\") still runs on CPython, so tkinter tests execute where a display is available and skip otherwise.

🤖 Generated with Claude Code

The module creates `tkinter.Tk()` at import time. During PyPy interpreter
shutdown, `_tkinter/app.py`'s `__del__` calls `threading.notify_all`,
which can abort the process with `Fatal Python error: Aborted`. When
this happens inside an xdist worker it takes the worker down and fails
whichever unrelated test happens to be running (e.g. test_case_three),
showing up as a non-deterministic CI failure.

The skip guard previously only covered macOS+PyPy; extend it to all
PyPy platforms so the Linux PyPy job stops flaking.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 17, 2026

Coverage Status

coverage: 93.45%. remained the same — fix/tkinter-test-skip-pypy-linux into master

Collapse the `pytest.skip(...)` call onto a single line per ruff-format.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dbrattli dbrattli merged commit 7d3f66c into master Apr 17, 2026
42 checks passed
@dbrattli dbrattli deleted the fix/tkinter-test-skip-pypy-linux branch April 17, 2026 21:52
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