MCPcopy Index your code
hub / github.com/python/cpython / check_unpickler

Method check_unpickler

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

Source from the content-addressed store, hash-verified

540
541 stdsize = basesize + len('ASCII') + 1 + len('strict') + 1
542 def check_unpickler(data, memo_size, marks_size):
543 dump = pickle.dumps(data)
544 u = unpickler(io.BytesIO(dump),
545 encoding='ASCII', errors='strict')
546 u.load()
547 check(u, stdsize + memo_size * P + marks_size * n)
548
549 check_unpickler(0, 32, 0)
550 # 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