[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 897e716d03)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2023-05-27 14:52:14 -07:00 committed by GitHub
parent d1a7d66fcb
commit dcfa8165ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1403,10 +1403,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):