mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) (GH-29080)
Since v8.6.11, a few configuration options seem to accept an empty value
where they did not previously; particularly the `type` of a `Menu`
widget, and the `compound` of any ttk widget with a label. Providing an
explicit expected error message to `checkEnumParam` bypasses the check
of an empty value, which no longer raises `TclError`.
(cherry picked from commit 4fe454c6f5
)
Co-authored-by: Zachary Ware <zach@python.org>
This commit is contained in:
parent
c15ba304f3
commit
b8dbb3a7f9
2 changed files with 11 additions and 5 deletions
|
@ -1241,8 +1241,11 @@ class MenuTest(AbstractWidgetTest, unittest.TestCase):
|
|||
|
||||
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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue