MCPcopy Index your code
hub / github.com/RustPython/RustPython / check_unpickler

Method check_unpickler

Lib/test/test_pickle.py:612–617  ·  view source on GitHub ↗
(data, memo_size, marks_size)

Source from the content-addressed store, hash-verified

610
611 stdsize = basesize + len('ASCII') + 1 + len('strict') + 1
612 def check_unpickler(data, memo_size, marks_size):
613 dump = pickle.dumps(data)
614 u = unpickler(io.BytesIO(dump),
615 encoding='ASCII', errors='strict')
616 u.load()
617 check(u, stdsize + memo_size * P + marks_size * n)
618
619 check_unpickler(0, 32, 0)
620 # 20 is minimal non-empty mark stack size.

Callers

nothing calls this directly

Calls 3

checkFunction · 0.70
dumpsMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected