https://github.com/python/cpython/commit/47c8f84a1cfbdd82d6938e625b9089879921f77c
commit: 47c8f84a1cfbdd82d6938e625b9089879921f77c
branch: main
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-09-19T23:54:01+03:00
summary:
gh-157782: Fix test_ttk for Tk 9.1b1 and 9.0.5 (GH-157783)
The empty string is now accepted for -justify of ttk::entry,
ttk::combobox and ttk::spinbox, and for -anchor of ttk::label.
files:
M Lib/test/test_ttk/test_widgets.py
diff --git a/Lib/test/test_ttk/test_widgets.py
b/Lib/test/test_ttk/test_widgets.py
index 6ed593e3e43bb07..223078625ecaad4 100644
--- a/Lib/test/test_ttk/test_widgets.py
+++ b/Lib/test/test_ttk/test_widgets.py
@@ -214,6 +214,13 @@ class LabelTest(AbstractLabelTest, unittest.TestCase):
def create(self, **kwargs):
return ttk.Label(self.root, **kwargs)
+ def test_configure_anchor(self):
+ widget = self.create()
+ values = ('n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw', 'center')
+ if get_tk_patchlevel(self.root) >= (9, 0, 5):
+ values += ('',)
+ self.checkEnumParam(widget, 'anchor', *values)
+
test_configure_justify = StandardOptionsTests.test_configure_justify
@@ -347,6 +354,7 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase):
def setUp(self):
super().setUp()
self.entry = self.create()
+ self._allow_empty_justify = get_tk_patchlevel(self.root) >= (9, 0, 5)
def create(self, **kwargs):
return ttk.Entry(self.root, **kwargs)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]