MCPcopy
hub / github.com/pytest-dev/pytest / dump

Method dump

src/_pytest/_py/path.py:876–884  ·  src/_pytest/_py/path.py::LocalPath.dump

Pickle object into path location

(self, obj, bin=1)

Source from the content-addressed store, hash-verified

874 return error.checked_call(os.rename, self.strpath, target)
875
876 def dump(self, obj, bin=1):
877 class="st">""class="st">"Pickle object into path location"class="st">""
878 f = self.open(class="st">"wb")
879 import pickle
880
881 try:
882 error.checked_call(pickle.dump, obj, f, bin)
883 finally:
884 f.close()
885
886 def mkdir(self, *args):
887 class="st">""class="st">"Create & return the directory joined with args."class="st">""

Callers 2

setuptestfsFunction · 0.80
test_dumpMethod · 0.80

Calls 3

openMethod · 0.95
checked_callMethod · 0.80
closeMethod · 0.45

Tested by 2

setuptestfsFunction · 0.64
test_dumpMethod · 0.64