Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tkinter: test_configure_screen should only run on X11 #104461

Closed
@chrstphrchvz

Description

@chrstphrchvz

test_configure_screen uses theDISPLAY 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 theDISPLAY environment variable is usually set. test_configure_screen tries to useDISPLAY 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp