From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 27 May 2023 21:51:05 +0000 (-0700) Subject: [3.12] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105028) X-Git-Tag: v3.12.0b2~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5426ff14765bda6c1bf5a74f8223edc144bc8b1f;p=thirdparty%2FPython%2Fcpython.git [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 Co-authored-by: Serhiy Storchaka --- diff --git a/Lib/test/test_tkinter/test_widgets.py b/Lib/test/test_tkinter/test_widgets.py index 76cc16e5b977..34e67c0cbc44 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):