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

Method test_dump

testing/_py/test_local.py:722–733  ·  testing/_py/test_local.py::TestLocalPath.test_dump
(self, tmpdir, bin)

Source from the content-addressed store, hash-verified

720
721 @pytest.mark.parametrize(class="st">"bin", (False, True))
722 def test_dump(self, tmpdir, bin):
723 path = tmpdir.join(fclass="st">"dumpfile{int(bin)}")
724 try:
725 d = {class="st">"answer": 42}
726 path.dump(d, bin=bin)
727 f = path.open(class="st">"rb+")
728 import pickle
729
730 dnew = pickle.load(f)
731 assert d == dnew
732 finally:
733 f.close()
734
735 def test_setmtime(self):
736 import tempfile

Callers

nothing calls this directly

Calls 6

intClass · 0.85
joinMethod · 0.80
dumpMethod · 0.80
openMethod · 0.80
loadMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected