(self)
| 3553 | self.produce_global_ext(0x12abcdef, pickle.EXT4) # check endianness |
| 3554 | |
| 3555 | def test_list_chunking(self): |
| 3556 | n = 10 # too small to chunk |
| 3557 | x = list(range(n)) |
| 3558 | for proto in protocols: |
| 3559 | s = self.dumps(x, proto) |
| 3560 | y = self.loads(s) |
| 3561 | self.assert_is_copy(x, y) |
| 3562 | num_appends = count_opcode(pickle.APPENDS, s) |
| 3563 | self.assertEqual(num_appends, proto > 0) |
| 3564 | |
| 3565 | n = 2500 # expect at least two chunks when proto > 0 |
| 3566 | x = list(range(n)) |
| 3567 | for proto in protocols: |
| 3568 | s = self.dumps(x, proto) |
| 3569 | y = self.loads(s) |
| 3570 | self.assert_is_copy(x, y) |
| 3571 | num_appends = count_opcode(pickle.APPENDS, s) |
| 3572 | if proto == 0: |
| 3573 | self.assertEqual(num_appends, 0) |
| 3574 | else: |
| 3575 | self.assertTrue(num_appends >= 2) |
| 3576 | |
| 3577 | def test_dict_chunking(self): |
| 3578 | n = 10 # too small to chunk |
nothing calls this directly
no test coverage detected