Skip to content

Commit

Permalink
gh-104497: Make tkinter test pass with tk 8.7 (#104789)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
terryjreedy and serhiy-storchaka authored May 27, 2023
1 parent a989b73 commit 897e716
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/test/test_tkinter/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1408,10 +1408,13 @@ def test_configure_title(self):

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):
Expand Down

0 comments on commit 897e716

Please sign in to comment.