(self)
| 1023 | recorders = self.exception_recorders) |
| 1024 | |
| 1025 | def test_throw(self): |
| 1026 | |
| 1027 | def gen(): |
| 1028 | yield 1 |
| 1029 | yield 2 |
| 1030 | |
| 1031 | def func(): |
| 1032 | try: |
| 1033 | g = gen() |
| 1034 | next(g) |
| 1035 | g.throw(IndexError) |
| 1036 | except IndexError: |
| 1037 | pass |
| 1038 | |
| 1039 | self.check_balanced( |
| 1040 | func, |
| 1041 | recorders = self.exception_recorders) |
| 1042 | |
| 1043 | events = self.get_events( |
| 1044 | func, |
| 1045 | TEST_TOOL, |
| 1046 | self.exception_recorders + (ThrowRecorder,) |
| 1047 | ) |
| 1048 | self.assertEqual(events[0], ("throw", IndexError)) |
| 1049 | |
| 1050 | @requires_specialization |
| 1051 | def test_no_unwind_for_shim_frame(self): |
nothing calls this directly
no test coverage detected