summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-05-27 21:52:14 (GMT)
committerGitHub <noreply@github.com>2023-05-27 21:52:14 (GMT)
commitdcfa8165ad3444f4c9ea3d8cb0f9f0a007e9937b (patch)
tree0f84190f45f8b8454d02649371bb5f0089540244
parentd1a7d66fcb147bfb792264abd37720828b9ec437 (diff)
downloadcpython-dcfa8165ad3444f4c9ea3d8cb0f9f0a007e9937b.zip
cpython-dcfa8165ad3444f4c9ea3d8cb0f9f0a007e9937b.tar.gz
cpython-dcfa8165ad3444f4c9ea3d8cb0f9f0a007e9937b.tar.bz2
[3.11] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105029)
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>
-rw-r--r--Lib/tkinter/test/test_tkinter/test_widgets.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py
index f014915..2a59135 100644
--- a/Lib/tkinter/test/test_tkinter/test_widgets.py
+++ b/Lib/tkinter/test/test_tkinter/test_widgets.py
@@ -1403,10 +1403,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):