https://github.com/python/cpython/commit/65204b776c7d7c65e8e447b6039b142a9a2198de
commit: 65204b776c7d7c65e8e447b6039b142a9a2198de
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-09-19T21:22:18Z
summary:

[3.14] gh-157782: Fix test_ttk for Tk 9.1b1 and 9.0.5 (GH-157783) (GH-157824)

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 9fd7a7c9f06ba3e..216f5304bbad6f2 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]

Reply via email to