summaryrefslogtreecommitdiff
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2021-10-20 20:55:46 -0700
committerGitHub <noreply@github.com>2021-10-20 20:55:46 -0700
commitc52338fc42353e8d0c6214e4c22427807439dfd5 (patch)
tree6da4bf5da5eb739aa48eab1850218d5726c45b10 /Lib/tkinter
parent8f05ffb0534c2343fc45ad0e1d91ae1dc2d92b64 (diff)
parent2a9ab75af32b1ee9f210ae2a0718990687d0f79d (diff)
downloadcpython-git-enum-private-310.tar.gz
Merge branch '3.10' into enum-private-310enum-private-310
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.py11
2 files changed, 12 insertions, 6 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py
index 39334de8cf..cc227e5796 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 a2a4de2e5c..935be3d7f1 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()
@@ -968,7 +971,7 @@ class NotebookTest(AbstractWidgetTest, unittest.TestCase):
tabs = self.nb.tabs()
curr = self.nb.index('current')
- # verify that the tab gets read at its previous position
+ # verify that the tab gets re-added at its previous position
child2_index = self.nb.index(self.child2)
self.nb.hide(self.child2)
self.nb.add(self.child2)