Tuples as keys in dicts can be serialized

This commit is contained in:
William Paul
2016-08-24 23:31:09 +00:00
parent 7b548bddd3
commit f468871b5d
4 changed files with 13 additions and 6 deletions
+3 -2
View File
@@ -3,8 +3,9 @@ import libnumbuf
import numpy as np
from numpy.testing import assert_equal
TEST_OBJECTS = [[1, "hello", 3.0], 42, 43L, "hello world", u"x", u"\u262F",
42.0, 1L << 62, (1.0, "hi"),
TEST_OBJECTS = [{(1,2) : 1}, {() : 2}, [1, "hello", 3.0], 42, 43L, "hello world",
u"x", u"\u262F", 42.0,
1L << 62, (1.0, "hi"),
None, (None, None), ("hello", None),
True, False, (True, False), "hello",
{True: "hello", False: "world"},