Skip to content

Commit

Permalink
[3.11] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#10…
Browse files Browse the repository at this point in the history
…5029)

For test_widgets.MenuTest.test_configure_type, the options
in the error message change to alphabetical order.
---------

(cherry picked from commit 897e716)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
3 people committed May 27, 2023
1 parent d1a7d66 commit dcfa816
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/tkinter/test/test_tkinter/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1403,10 +1403,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 dcfa816

Please sign in to comment.