예제 #1
0
def test():
    compickled = pickle_tools.compickle(my_messy_object)

    # assert len(compickled) < len(pickle_module.dumps(my_messy_object))
    # I commented out the assert above, because possibly new versions of Python
    # possibly have built-in compression in `pickle`.

    assert pickle_tools.decompickle(compickled) == my_messy_object
예제 #2
0
def test():
    compickled = pickle_tools.compickle(my_messy_object)
    assert len(compickled) < len(pickle_module.dumps(my_messy_object))
    assert pickle_tools.decompickle(compickled) == my_messy_object
예제 #3
0
def test():
    compickled = pickle_tools.compickle(my_messy_object)
    assert len(compickled) < len(pickle_module.dumps(my_messy_object))
    assert pickle_tools.decompickle(compickled) == my_messy_object