Skip to content

Commit 5426ff1

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_tkinter/test_widgets.py

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

14091409
def test_configure_type(self):
14101410
widget = self.create()
1411+
opts = ('normal, tearoff, or menubar'
1412+
if widget.info_patchlevel() < (8, 7) else
1413+
'menubar, normal, or tearoff')
14111414
self.checkEnumParam(
14121415
widget, 'type',
14131416
'normal', 'tearoff', 'menubar',
1414-
errmsg='bad type "{}": must be normal, tearoff, or menubar',
1417+
errmsg='bad type "{}": must be ' + opts,
14151418
)
14161419

14171420
def test_entryconfigure(self):

0 commit comments

Comments
 (0)