summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-05-21 14:12:21 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-05-21 14:12:21 (GMT)
commit2b00c4999d6d1b517d6b382d6b584b34c0834d32 (patch)
tree91b752fde108358901441003d17609d8ca52e390 /Lib/test/test_tcl.py
parent8b852f111eb3e3f2e4f53f207859fdb3654d9b10 (diff)
downloadcpython-2b00c4999d6d1b517d6b382d6b584b34c0834d32.zip
cpython-2b00c4999d6d1b517d6b382d6b584b34c0834d32.tar.gz
cpython-2b00c4999d6d1b517d6b382d6b584b34c0834d32.tar.bz2
Issue #21525: Most Tkinter methods which accepted tuples now accept lists too.
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index d12fb22..c9a558c 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -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')),