[Py3.2] msgpack transforms lists into tuples in some versions

This commit is contained in:
Ask Solem 2013-09-10 18:05:25 +01:00
parent ef03c5a344
commit 11d5674a8d
1 changed files with 5 additions and 1 deletions

View File

@ -191,7 +191,11 @@ class test_Serialization(TestCase):
res[k] = v.encode()
if isinstance(v, (list, tuple)):
res[k] = [i.encode() for i in v]
print('RES: %r' % (res, ))
# On Python 3.2 (or some msgpack versions maybe? lists are magically
# transformed into tuples...
if res != msgpack_py_data:
res['list'] = tuple(res['list'])
self.assertEqual(
msgpack_py_data,
res,