aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/tkinter
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/test/test_tkinter/test_widgets.py7
-rw-r--r--Lib/tkinter/test/test_ttk/test_widgets.py9
2 files changed, 11 insertions, 5 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()
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py
index a2a4de2e5cc..904aed0ac2d 100644
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -169,10 +169,13 @@ class AbstractLabelTest(AbstractWidgetTest):
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()