https://github.com/python/cpython/commit/bc1446bb9c455f8403ad5bff0a2d95d7b297d9db commit: bc1446bb9c455f8403ad5bff0a2d95d7b297d9db branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-09-19T21:18:40Z summary:
[3.13] gh-157782: Fix test_ttk for Tk 9.1b1 and 9.0.5 (GH-157783) (GH-157825) The empty string is now accepted for -justify of ttk::entry, ttk::combobox and ttk::spinbox, and for -anchor of ttk::label. (cherry picked from commit 47c8f84a1cfbdd82d6938e625b9089879921f77c) Co-authored-by: Serhiy Storchaka <[email protected]> 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 a588b19e6b73540..86609cb77625b7d 100644 --- a/Lib/test/test_ttk/test_widgets.py +++ b/Lib/test/test_ttk/test_widgets.py @@ -220,6 +220,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 @@ -353,6 +360,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]
