gh-104461: Run tkinter test_configure_screen on X11 only (GH-104462)

This commit is contained in:
Christopher Chavez 2023-05-15 21:22:53 -05:00 committed by GitHub
parent 456d56698d
commit fdafdc235e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -76,6 +76,8 @@ class ToplevelTest(AbstractToplevelTest, unittest.TestCase):
def test_configure_screen(self): def test_configure_screen(self):
widget = self.create() widget = self.create()
if widget._windowingsystem != 'x11':
self.skipTest('Not using Tk for X11')
self.assertEqual(widget['screen'], '') self.assertEqual(widget['screen'], '')
try: try:
display = os.environ['DISPLAY'] display = os.environ['DISPLAY']

View File

@ -0,0 +1,3 @@
Run test_configure_screen on X11 only, since the ``DISPLAY``
environment variable and ``-screen`` option for toplevels
are not useful on Tk for Win32 or Aqua.