(self)
| 239 | self.assertEqual(list(it), []) |
| 240 | |
| 241 | def test_mutating_seq_class_exhausted_iter(self): |
| 242 | a = SequenceClass(5) |
| 243 | exhit = iter(a) |
| 244 | empit = iter(a) |
| 245 | for x in exhit: # exhaust the iterator |
| 246 | next(empit) # not exhausted |
| 247 | a.n = 7 |
| 248 | self.assertEqual(list(exhit), []) |
| 249 | self.assertEqual(list(empit), [5, 6]) |
| 250 | self.assertEqual(list(a), [0, 1, 2, 3, 4, 5, 6]) |
| 251 | |
| 252 | def test_reduce_mutating_builtins_iter(self): |
| 253 | # This is a reproducer of issue #101765 |
nothing calls this directly
no test coverage detected