mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
ef01e95ae3
commit
9732ed5ca9
2 changed files with 22 additions and 9 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue