]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-104461: Run tkinter test_configure_screen on X11 only (GH-104526)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 16 May 2023 02:47:51 +0000 (19:47 -0700)
committerGitHub <noreply@github.com>
Tue, 16 May 2023 02:47:51 +0000 (02:47 +0000)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Lib/tkinter/test/test_tkinter/test_widgets.py
Misc/NEWS.d/next/Tests/2023-05-14-03-00-00.gh-issue-104461.Rmex11.rst [new file with mode: 0644]

index a756276ec76966b6c0ef503ff9f6ac4d27a91e24..f0149153512fb58adcf72827139d93b6da25ba79 100644 (file)
@@ -77,6 +77,8 @@ class ToplevelTest(AbstractToplevelTest, unittest.TestCase):
 
     def test_configure_screen(self):
         widget = self.create()
+        if widget._windowingsystem != 'x11':
+            self.skipTest('Not using Tk for X11')
         self.assertEqual(widget['screen'], '')
         try:
             display = os.environ['DISPLAY']
diff --git a/Misc/NEWS.d/next/Tests/2023-05-14-03-00-00.gh-issue-104461.Rmex11.rst b/Misc/NEWS.d/next/Tests/2023-05-14-03-00-00.gh-issue-104461.Rmex11.rst
new file mode 100644 (file)
index 0000000..ae69f62
--- /dev/null
@@ -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.