diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-30 21:16:35 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-30 21:16:35 (GMT) |
| commit | 978b86a91e381bf7cc987ac3e44b0251e4a474ba (patch) | |
| tree | 1190f2f74855d73c209a72581db2bd0457d87eb5 /Lib/test/test_tkinter/test_widgets.py | |
| parent | 1e75dc7324dec488986daef2f6439856f6dc5081 (diff) | |
| download | cpython-978b86a91e381bf7cc987ac3e44b0251e4a474ba.zip cpython-978b86a91e381bf7cc987ac3e44b0251e4a474ba.tar.gz cpython-978b86a91e381bf7cc987ac3e44b0251e4a474ba.tar.bz2 | |
[3.13] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (GH-119806)
(cherry picked from commit 9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea)
Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_tkinter/test_widgets.py')
| -rw-r--r-- | Lib/test/test_tkinter/test_widgets.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/test/test_tkinter/test_widgets.py b/Lib/test/test_tkinter/test_widgets.py index 85bf5ff..f5f2fd2 100644 --- a/Lib/test/test_tkinter/test_widgets.py +++ b/Lib/test/test_tkinter/test_widgets.py @@ -660,7 +660,9 @@ class TextTest(AbstractWidgetTest, unittest.TestCase): widget = self.create() self.checkParam(widget, 'tabs', (10.2, 20.7, '1i', '2i')) self.checkParam(widget, 'tabs', '10.2 20.7 1i 2i', - expected=('10.2', '20.7', '1i', '2i')) + expected=(10.2, 20.7, '1i', '2i') + if get_tk_patchlevel(self.root) >= (8, 6, 14) + else ('10.2', '20.7', '1i', '2i')) self.checkParam(widget, 'tabs', '2c left 4c 6c center', expected=('2c', 'left', '4c', '6c', 'center')) self.checkInvalidParam(widget, 'tabs', 'spam', @@ -999,12 +1001,16 @@ class ListboxTest(AbstractWidgetTest, unittest.TestCase): widget.itemconfigure() with self.assertRaisesRegex(TclError, 'bad listbox index "red"'): widget.itemconfigure('red') + if get_tk_patchlevel(self.root) >= (8, 6, 14): + prefix = ('background', '', '', '') + else: + prefix = ('background', 'background', 'Background', '') self.assertEqual(widget.itemconfigure(0, 'background'), - ('background', 'background', 'Background', '', 'red')) + (*prefix, 'red')) self.assertEqual(widget.itemconfigure('end', 'background'), - ('background', 'background', 'Background', '', 'violet')) + (*prefix, 'violet')) self.assertEqual(widget.itemconfigure('@0,0', 'background'), - ('background', 'background', 'Background', '', 'red')) + (*prefix, 'red')) d = widget.itemconfigure(0) self.assertIsInstance(d, dict) |
