Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.10] bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) #29080

Merged
merged 1 commit into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Lib/tkinter/test/test_tkinter/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1241,8 +1241,11 @@ def test_configure_title(self):

def test_configure_type(self):
widget = self.create()
self.checkEnumParam(widget, 'type',
'normal', 'tearoff', 'menubar')
self.checkEnumParam(
widget, 'type',
'normal', 'tearoff', 'menubar',
errmsg='bad type "{}": must be normal, tearoff, or menubar',
)

def test_entryconfigure(self):
m1 = self.create()
Expand Down
9 changes: 6 additions & 3 deletions Lib/tkinter/test/test_ttk/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,13 @@ def checkImageParam(self, widget, name):
errmsg='image "spam" doesn\'t exist')

def test_configure_compound(self):
options = 'none text image center top bottom left right'.split()
errmsg = (
'bad compound "{}": must be'
f' {", ".join(options[:-1])}, or {options[-1]}'
)
widget = self.create()
self.checkEnumParam(widget, 'compound',
'none', 'text', 'image', 'center',
'top', 'bottom', 'left', 'right')
self.checkEnumParam(widget, 'compound', *options, errmsg=errmsg)

def test_configure_state(self):
widget = self.create()
Expand Down