astral-sh / astral-sh/python-build-standalone
Run test_tkinter in CI
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 314
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 27
Description
From src/verify_distribution.py:
```python
@unittest.skipIf("TCL_LIBRARY" not in os.environ, "TCL_LIBRARY not set")
@unittest.skipIf("DISPLAY" not in os.environ, "DISPLAY not set")
def test_tkinter(self):
import tkinter as tk
...
```
We ought to be able to run this in Xvfb and ensure it runs, though we'd have to automate clicking the button, either by injecting a button click or by modifying the test to quit on its own.
(It looks like [Tk is pretty heavily tied to X11 at the moment](https://discuss.python.org/t/feature-request-wayland-support-for-tkinter/75198), but if we feel like being complete, we could also test under Xwayland + [some headless Wayland compositor](https://unix.stackexchange.com/q/653672) like `WLR_BACKENDS=headless sway` or `weston --backend=headless`.)
Contributor guide
Assessment
This issue has not been assessed yet.