MCPcopy Create free account
hub / github.com/cloudpipe/cloudpickle / pickle_depickle

Function pickle_depickle

tests/cloudpickle_test.py:70–74  ·  view source on GitHub ↗

Helper function to test whether object pickled with cloudpickle can be depickled with pickle

(obj, protocol=cloudpickle.DEFAULT_PROTOCOL)

Source from the content-addressed store, hash-verified

68
69
70def pickle_depickle(obj, protocol=cloudpickle.DEFAULT_PROTOCOL):
71 """Helper function to test whether object pickled with cloudpickle can be
72 depickled with pickle
73 """
74 return pickle.loads(cloudpickle.dumps(obj, protocol=protocol))
75
76
77def _escape(raw_filepath):

Callers 15

test_itemgetterMethod · 0.85
test_attrgetterMethod · 0.85
test_memoryviewMethod · 0.85
test_dict_keysMethod · 0.85
test_dict_valuesMethod · 0.85
test_dict_itemsMethod · 0.85
test_odict_keysMethod · 0.85
test_odict_valuesMethod · 0.85
test_odict_itemsMethod · 0.85
test_large_memoryviewMethod · 0.85
test_lambdaMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected