mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #21525: Most Tkinter methods which accepted tuples now accept lists too.
This commit is contained in:
parent
8b852f111e
commit
2b00c4999d
3 changed files with 50 additions and 33 deletions
|
@ -368,6 +368,8 @@ class TclTest(unittest.TestCase):
|
|||
self.assertEqual(float(passValue(-float('inf'))), -float('inf'))
|
||||
self.assertEqual(passValue((1, '2', (3.4,))),
|
||||
(1, '2', (3.4,)) if self.wantobjects else '1 2 3.4')
|
||||
self.assertEqual(passValue(['a', ['b', 'c']]),
|
||||
('a', ('b', 'c')) if self.wantobjects else 'a {b c}')
|
||||
|
||||
def test_user_command(self):
|
||||
result = None
|
||||
|
@ -415,6 +417,7 @@ class TclTest(unittest.TestCase):
|
|||
check(float('nan'), 'NaN', eq=nan_eq)
|
||||
check((), '')
|
||||
check((1, (2,), (3, 4), '5 6', ()), '1 2 {3 4} {5 6} {}')
|
||||
check([1, [2,], [3, 4], '5 6', []], '1 2 {3 4} {5 6} {}')
|
||||
|
||||
def test_splitlist(self):
|
||||
splitlist = self.interp.tk.splitlist
|
||||
|
@ -440,6 +443,8 @@ class TclTest(unittest.TestCase):
|
|||
('a 3.4', ('a', '3.4')),
|
||||
(('a', 3.4), ('a', 3.4)),
|
||||
((), ()),
|
||||
([], ()),
|
||||
(['a', ['b', 'c']], ('a', ['b', 'c'])),
|
||||
(call('list', 1, '2', (3.4,)),
|
||||
(1, '2', (3.4,)) if self.wantobjects else
|
||||
('1', '2', '3.4')),
|
||||
|
@ -487,6 +492,9 @@ class TclTest(unittest.TestCase):
|
|||
(('a', 3.4), ('a', 3.4)),
|
||||
(('a', (2, 3.4)), ('a', (2, 3.4))),
|
||||
((), ()),
|
||||
([], ()),
|
||||
(['a', 'b c'], ('a', ('b', 'c'))),
|
||||
(['a', ['b', 'c']], ('a', ('b', 'c'))),
|
||||
(call('list', 1, '2', (3.4,)),
|
||||
(1, '2', (3.4,)) if self.wantobjects else
|
||||
('1', '2', '3.4')),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue