diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2023-05-27 19:23:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-27 19:23:56 (GMT) |
commit | 897e716d03d559a10dd5015ecb501ceb98955f3a (patch) | |
tree | 244a6ef46f61ba1822ee8f0e10b28ccf74a30166 /Lib/test/test_tkinter | |
parent | a989b73e8ebf869dcc71d06127e8797c92260a0f (diff) | |
download | cpython-897e716d03d559a10dd5015ecb501ceb98955f3a.zip cpython-897e716d03d559a10dd5015ecb501ceb98955f3a.tar.gz cpython-897e716d03d559a10dd5015ecb501ceb98955f3a.tar.bz2 |
gh-104497: Make tkinter test pass with tk 8.7 (#104789)
* gh-104497: Make tkinter test pass with tk 8.7
For test_widgets.MenuTest.test_configure_type, the options
in the error message change to alphabetical order.
* Update Lib/test/test_tkinter/test_widgets.py
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
---------
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_tkinter')
-rw-r--r-- | Lib/test/test_tkinter/test_widgets.py | 5 |
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): |