(self)
| 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): |
nothing calls this directly
no test coverage detected