[Python-checkins] gh-104461: Run tkinter test_configure_screen on X11 only (GH-104462)

ned-deily webhook-mailer at python.org
Mon May 15 22:23:00 EDT 2023


https://github.com/python/cpython/commit/fdafdc235e74f2f4fedc1f745bf8b90141daa162
commit: fdafdc235e74f2f4fedc1f745bf8b90141daa162
branch: main
author: Christopher Chavez <chrischavez at gmx.us>
committer: ned-deily <nad at python.org>
date: 2023-05-15T22:22:53-04:00
summary:

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

files:
A Misc/NEWS.d/next/Tests/2023-05-14-03-00-00.gh-issue-104461.Rmex11.rst
M Lib/test/test_tkinter/test_widgets.py

diff --git a/Lib/test/test_tkinter/test_widgets.py b/Lib/test/test_tkinter/test_widgets.py
index ba4ef49078c5..b45245162f24 100644
--- a/Lib/test/test_tkinter/test_widgets.py
+++ b/Lib/test/test_tkinter/test_widgets.py
@@ -76,6 +76,8 @@ def test_configure_menu(self):
 
     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
index 000000000000..ae69f623e945
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2023-05-14-03-00-00.gh-issue-104461.Rmex11.rst
@@ -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.



More information about the Python-checkins mailing list