aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/tkinter/test/test_tkinter/test_widgets.py
diff options
context:
space:
mode:
authorZachary Ware <zach@python.org>2021-10-19 21:54:19 -0500
committerGitHub <noreply@github.com>2021-10-19 21:54:19 -0500
commit4fe454c6f54b0948af67b53af6c2f35af6377e69 (patch)
treef9ac5b60e7bc8df1cc908c83fcd46f7c25e43c00 /Lib/tkinter/test/test_tkinter/test_widgets.py
parent3163e68c342434db37c69669017f96a4bb2d5f13 (diff)
downloadcpython-4fe454c6f54b0948af67b53af6c2f35af6377e69.tar.gz
cpython-4fe454c6f54b0948af67b53af6c2f35af6377e69.zip
bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077)
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`.
Diffstat (limited to 'Lib/tkinter/test/test_tkinter/test_widgets.py')
-rw-r--r--Lib/tkinter/test/test_tkinter/test_widgets.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py
index 39334de8cf4..cc227e57967 100644
--- a/Lib/tkinter/test/test_tkinter/test_widgets.py
+++ b/Lib/tkinter/test/test_tkinter/test_widgets.py
@@ -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()