Fixed merge test for Tcl/Tk <8.5 (issue #18964).

This commit is contained in:
Serhiy Storchaka 2013-10-27 12:38:01 +02:00
parent d2d6beaa69
commit 8797dcd9d5
1 changed files with 5 additions and 2 deletions

View File

@ -277,9 +277,12 @@ class TclTest(unittest.TestCase):
(('a', (2, 3.4)), 'a {2 3.4}'),
((), ''),
((call('list', 1, '2', (3.4,)),), '{1 2 3.4}'),
((call('dict', 'create', 12, '\u20ac', b'\xe2\x82\xac', (3.4,)),),
'{12 € € 3.4}'),
]
if tcl_version >= (8, 5):
testcases += [
((call('dict', 'create', 12, '\u20ac', b'\xe2\x82\xac', (3.4,)),),
'{12 € € 3.4}'),
]
for args, res in testcases:
self.assertEqual(merge(*args), res, msg=args)
self.assertRaises(UnicodeDecodeError, merge, b'\x80')