def test_dump_load(): x = ("he", 7, "llo", 8, (), 900, None, True, 18.2, 18.2j + 13, slice(1, 2, 3), frozenset([5, 6, 7]), bytes([0x11])) assert dumpable(x) y = dump(x) z = load(y) print(x) print(y) print(z) assert x == z
def test_unpickable(): x = (NotImplemented) y = dump(x)
def test_unloadable(): x = ("he", 7, "llo", 8, (), 900, None, True, 18.2, 18.2j + 13, slice(1, 2, 3), frozenset([5, 6, 7]), bytes([0x11])) y = dump(x) y = bytes([0x02]) + y z = load(y)
def test_undumpable(): x = dump({1:2})
def test_undumpable(): x = dump({1: 2})