(self)
| 447 | self.assertIsNone(sys.exception()) |
| 448 | |
| 449 | def test_except_next(self): |
| 450 | def gen(): |
| 451 | self.assertIsInstance(sys.exception(), ValueError) |
| 452 | yield "done" |
| 453 | |
| 454 | g = gen() |
| 455 | try: |
| 456 | raise ValueError |
| 457 | except Exception: |
| 458 | self.assertEqual(next(g), "done") |
| 459 | self.assertIsNone(sys.exception()) |
| 460 | |
| 461 | def test_except_gen_except(self): |
| 462 | def gen(): |
nothing calls this directly
no test coverage detected