MCPcopy
hub / github.com/cloudpipe/cloudpickle / load_obj

Function load_obj

tests/test_backward_compat.py:20–33  ·  view source on GitHub ↗
(filename, check_deprecation_warning="auto")

Source from the content-addressed store, hash-verified

18
19
20def load_obj(filename, check_deprecation_warning="auto"):
21 if check_deprecation_warning == "auto":
22 check_deprecation_warning = False
23 pickle_filepath = PICKLE_DIRECTORY / filename
24 if not pickle_filepath.exists():
25 pytest.skip(f"Could not find {str(pickle_filepath)}")
26 with open(str(pickle_filepath), "rb") as f:
27 if check_deprecation_warning:
28 msg = "A pickle file created using an old"
29 with pytest.warns(UserWarning, match=msg):
30 obj = pickle.load(f)
31 else:
32 obj = pickle.load(f)
33 return obj
34
35
36def test_simple_func():

Callers 7

test_simple_funcFunction · 0.85
test_simple_classFunction · 0.85
test_dynamic_moduleFunction · 0.85
test_simple_enumFunction · 0.85
test_complex_classFunction · 0.85
test_complex_functionFunction · 0.85
test_nested_functionFunction · 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…