(self)
| 404 | self.assertEqual(list(it), data[1:]) |
| 405 | |
| 406 | def test_iterator_pickling_overflowing_index(self): |
| 407 | for proto in range(pickle.HIGHEST_PROTOCOL + 1): |
| 408 | with self.subTest(proto=proto): |
| 409 | it = iter(range(2**32 + 2)) |
| 410 | it.__setstate__(2**32 + 1) # undocumented way to advance an iterator |
| 411 | d = pickle.dumps(it, proto) |
| 412 | it = pickle.loads(d) |
| 413 | self.assertEqual(next(it), 2**32 + 1) |
| 414 | |
| 415 | def test_exhausted_iterator_pickling(self): |
| 416 | for proto in range(pickle.HIGHEST_PROTOCOL + 1): |
nothing calls this directly
no test coverage detected