https://github.com/python/cpython/commit/a0c90b36f68560ebcc42c3ea7fb67812f6e1e132
commit: a0c90b36f68560ebcc42c3ea7fb67812f6e1e132
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: zware <[email protected]>
date: 2024-09-26T11:20:09-05:00
summary:

[3.12] gh-124378: Update test_ttk for Tcl/Tk 8.6.15 (GH-124545)

(cherry picked from commit fb6bd31cb74d2f7e7b525ee4fe9f45475fc94ce9)

Co-authored-by: Zachary Ware <[email protected]>
Co-authored-by: Marc Culler <[email protected]>

files:
A Misc/NEWS.d/next/Tests/2024-09-25-12-39-34.gh-issue-124378.Ywwgia.rst
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 eee39162054009..3e541fbc5a4ded 100644
--- a/Lib/test/test_ttk/test_widgets.py
+++ b/Lib/test/test_ttk/test_widgets.py
@@ -963,8 +963,7 @@ def create(self, **kwargs):
         return ttk.Scrollbar(self.root, **kwargs)
 
 
-@add_standard_options(PixelSizeTests if tk_version >= (8, 7) else 
IntegerSizeTests,
-                      StandardTtkOptionsTests)
+@add_standard_options(StandardTtkOptionsTests)
 class NotebookTest(AbstractWidgetTest, unittest.TestCase):
     OPTIONS = (
         'class', 'cursor', 'height', 'padding', 'style', 'takefocus', 'width',
@@ -983,6 +982,20 @@ def setUp(self):
     def create(self, **kwargs):
         return ttk.Notebook(self.root, **kwargs)
 
+    def test_configure_height(self):
+        widget = self.create()
+        if get_tk_patchlevel(self.root) < (8, 6, 15):
+            self.checkIntegerParam(widget, 'height', 402, -402, 0)
+        else:
+            self.checkPixelsParam(widget, 'height', '10c', 402, -402, 0, 
conv=False)
+
+    def test_configure_width(self):
+        widget = self.create()
+        if get_tk_patchlevel(self.root) < (8, 6, 15):
+            self.checkIntegerParam(widget, 'width', 402, -402, 0)
+        else:
+            self.checkPixelsParam(widget, 'width', '10c', 402, -402, 0, 
conv=False)
+
     def test_tab_identifiers(self):
         self.nb.forget(0)
         self.nb.hide(self.child2)
diff --git 
a/Misc/NEWS.d/next/Tests/2024-09-25-12-39-34.gh-issue-124378.Ywwgia.rst 
b/Misc/NEWS.d/next/Tests/2024-09-25-12-39-34.gh-issue-124378.Ywwgia.rst
new file mode 100644
index 00000000000000..9ddcca0eb6036d
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2024-09-25-12-39-34.gh-issue-124378.Ywwgia.rst
@@ -0,0 +1 @@
+Updated ``test_ttk`` to pass with Tcl/Tk 8.6.15.

_______________________________________________
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