Skip to content

Commit dcfa816

Browse files
miss-islingtonterryjreedyserhiy-storchaka
authored
[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 897e716) Co-authored-by: Terry Jan Reedy <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent d1a7d66 commit dcfa816

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/tkinter/test/test_tkinter/test_widgets.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1403,10 +1403,13 @@ def test_configure_title(self):
14031403

14041404
def test_configure_type(self):
14051405
widget = self.create()
1406+
opts = ('normal, tearoff, or menubar'
1407+
if widget.info_patchlevel() < (8, 7) else
1408+
'menubar, normal, or tearoff')
14061409
self.checkEnumParam(
14071410
widget, 'type',
14081411
'normal', 'tearoff', 'menubar',
1409-
errmsg='bad type "{}": must be normal, tearoff, or menubar',
1412+
errmsg='bad type "{}": must be ' + opts,
14101413
)
14111414

14121415
def test_entryconfigure(self):

0 commit comments

Comments
 (0)