summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-05-27 21:51:05 (GMT)
committerGitHub <noreply@github.com>2023-05-27 21:51:05 (GMT)
commit5426ff14765bda6c1bf5a74f8223edc144bc8b1f (patch)
treeb7ee315c058f544192b1c58fbc01b340174910c5 /Lib
parent2b176bc90269b400226d0219a05e9b4c49604c51 (diff)
downloadcpython-5426ff14765bda6c1bf5a74f8223edc144bc8b1f.zip
cpython-5426ff14765bda6c1bf5a74f8223edc144bc8b1f.tar.gz
cpython-5426ff14765bda6c1bf5a74f8223edc144bc8b1f.tar.bz2
[3.12] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105028)
For test_widgets.MenuTest.test_configure_type, the options in the error message change to alphabetical order. --------- (cherry picked from commit 897e716d03d559a10dd5015ecb501ceb98955f3a) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_tkinter/test_widgets.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_tkinter/test_widgets.py b/Lib/test/test_tkinter/test_widgets.py
index 76cc16e..34e67c0 100644
--- a/Lib/test/test_tkinter/test_widgets.py
+++ b/Lib/test/test_tkinter/test_widgets.py
@@ -1408,10 +1408,13 @@ class MenuTest(AbstractWidgetTest, unittest.TestCase):
def test_configure_type(self):
widget = self.create()
+ opts = ('normal, tearoff, or menubar'
+ if widget.info_patchlevel() < (8, 7) else
+ 'menubar, normal, or tearoff')
self.checkEnumParam(
widget, 'type',
'normal', 'tearoff', 'menubar',
- errmsg='bad type "{}": must be normal, tearoff, or menubar',
+ errmsg='bad type "{}": must be ' + opts,
)
def test_entryconfigure(self):