(self)
| 342 | |
| 343 | # Test two-argument iter() with function that raises StopIteration |
| 344 | def test_iter_function_stop(self): |
| 345 | def spam(state=[0]): |
| 346 | i = state[0] |
| 347 | if i == 10: |
| 348 | raise StopIteration |
| 349 | state[0] = i+1 |
| 350 | return i |
| 351 | self.check_iterator(iter(spam, 20), list(range(10)), pickle=False) |
| 352 | |
| 353 | def test_iter_function_concealing_reentrant_exhaustion(self): |
| 354 | # gh-101892: Test two-argument iter() with a function that |
nothing calls this directly
no test coverage detected