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

Method test_proto

Lib/test/pickletester.py:3322–3329  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3320 # Tests for protocol 2
3321
3322 def test_proto(self):
3323 for proto in protocols:
3324 pickled = self.dumps(None, proto)
3325 if proto >= 2:
3326 proto_header = pickle.PROTO + bytes([proto])
3327 self.assertStartsWith(pickled, proto_header)
3328 else:
3329 self.assertEqual(count_opcode(pickle.PROTO, pickled), 0)
3330
3331 def test_bad_proto(self):
3332 if self.py_version < (3, 8):

Callers

nothing calls this directly

Calls 4

count_opcodeFunction · 0.85
assertStartsWithMethod · 0.80
dumpsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected