(self)
| 570 | gen.throw(TypeError, TypeError(24), None) |
| 571 | |
| 572 | def test_stopiteration_error(self): |
| 573 | # See also PEP 479. |
| 574 | |
| 575 | def gen(): |
| 576 | raise StopIteration |
| 577 | yield |
| 578 | |
| 579 | with self.assertRaisesRegex(RuntimeError, 'raised StopIteration'): |
| 580 | next(gen()) |
| 581 | |
| 582 | def test_tutorial_stopiteration(self): |
| 583 | # Raise StopIteration" stops the generator too: |
nothing calls this directly
no test coverage detected