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