GeezerVison is showing github.com — Tkinter: test_configure_screen should only run on X11 · Issue #104461 · python/cpython
Tkinter: test_configure_screen should only run on X11 #104461Descriptiontest_configure_screen uses the DISPLAY environment variable, which is only relevant to X11; and the purpose of the test is to set the -screen option for a toplevel, which is only useful on Tk for X11, since Tk for the Win32 or Aqua windowing systems only support a single “screen” (called :0 by default).
I use XQuartz installed from MacPorts, and so the DISPLAY environment variable is usually set. test_configure_screen tries to use DISPLAY even if I am running the test on Tk Aqua:
======================================================================
ERROR: test_configure_screen (test.test_tkinter.test_widgets.ToplevelTest.test_configure_screen)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/user/git/cpython/Lib/test/test_tkinter/test_widgets.py", line 86, in test_configure_screen
widget2 = self.create(screen=display)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/git/cpython/Lib/test/test_tkinter/test_widgets.py", line 69, in create
return tkinter.Toplevel(self.root, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/git/cpython/Lib/tkinter/__init__.py", line 2678, in __init__
BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
File "/Users/user/git/cpython/Lib/tkinter/__init__.py", line 2629, in __init__
self.tk.call(
_tkinter.TclError: couldn't connect to display "/private/tmp/com.apple.launchd.yqEvGPTxFm/org.macports:0"
Linked PRs
Activityterryjreedy commented on May 15, 2023 @ned-deily Does proposed fix on PR of adding following at the top of the test seem right to you?
if widget._windowingsystem != 'x11':
self.skipTest('Not using Tk for X11')
ned-deily commented on May 16, 2023
Does proposed fix on PR of adding following at the top of the test seem right to you?
Yes, it does. I fixed a couple of problems with the NEWS file and then merged the fix to main (for 3.12) and to 3.11. Thanks for the PR, @chrstphrchvz!
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|