summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ttk
diff options
context:
space:
mode:
authorJames De Bias <81095953+DBJim@users.noreply.github.com>2024-05-30 20:34:59 (GMT)
committerGitHub <noreply@github.com>2024-05-30 20:34:59 (GMT)
commit9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea (patch)
treecd032b40714dee1c42b2f9ffdc9858ce8606152e /Lib/test/test_ttk
parentef01e95ae3659015c2ebe4ecdc048aadcda89930 (diff)
downloadcpython-9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea.zip
cpython-9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea.tar.gz
cpython-9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea.tar.bz2
gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_ttk')
-rw-r--r--Lib/test/test_ttk/test_widgets.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/Lib/test/test_ttk/test_widgets.py b/Lib/test/test_ttk/test_widgets.py
index ca7402b..2e0702d 100644
--- a/Lib/test/test_ttk/test_widgets.py
+++ b/Lib/test/test_ttk/test_widgets.py
@@ -27,13 +27,20 @@ class StandardTtkOptionsTests(StandardOptionsTests):
def test_configure_padding(self):
widget = self.create()
- self.checkParam(widget, 'padding', 0, expected=('0',))
- self.checkParam(widget, 'padding', 5, expected=('5',))
- self.checkParam(widget, 'padding', (5, 6), expected=('5', '6'))
+ if get_tk_patchlevel(self.root) < (8, 6, 14):
+ def padding_conv(value):
+ self.assertIsInstance(value, tuple)
+ return tuple(map(str, value))
+ else:
+ padding_conv = None
+ self.checkParam(widget, 'padding', 0, expected=(0,), conv=padding_conv)
+ self.checkParam(widget, 'padding', 5, expected=(5,), conv=padding_conv)
+ self.checkParam(widget, 'padding', (5, 6),
+ expected=(5, 6), conv=padding_conv)
self.checkParam(widget, 'padding', (5, 6, 7),
- expected=('5', '6', '7'))
+ expected=(5, 6, 7), conv=padding_conv)
self.checkParam(widget, 'padding', (5, 6, 7, 8),
- expected=('5', '6', '7', '8'))
+ expected=(5, 6, 7, 8), conv=padding_conv)
self.checkParam(widget, 'padding', ('5p', '6p', '7p', '8p'))
self.checkParam(widget, 'padding', (), expected='')