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

Function pickle_depickle

tests/cloudpickle_test.py:71–75  ·  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

69
70
71def pickle_depickle(obj, protocol=cloudpickle.DEFAULT_PROTOCOL):
72 """Helper function to test whether object pickled with cloudpickle can be
73 depickled with pickle
74 """
75 return pickle.loads(cloudpickle.dumps(obj, protocol=protocol))
76
77
78def _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

Used in the wild real call sites across dependent graphs

searching dependent graphs…