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
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