(self)
| 1782 | self.assertIn(b'MemoryError', err) |
| 1783 | |
| 1784 | def test_yield_in_nested_try_excepts(self): |
| 1785 | #Issue #25612 |
| 1786 | class MainError(Exception): |
| 1787 | pass |
| 1788 | |
| 1789 | class SubError(Exception): |
| 1790 | pass |
| 1791 | |
| 1792 | def main(): |
| 1793 | try: |
| 1794 | raise MainError() |
| 1795 | except MainError: |
| 1796 | try: |
| 1797 | yield |
| 1798 | except SubError: |
| 1799 | pass |
| 1800 | raise |
| 1801 | |
| 1802 | coro = main() |
| 1803 | coro.send(None) |
| 1804 | with self.assertRaises(MainError): |
| 1805 | coro.throw(SubError()) |
| 1806 | |
| 1807 | def test_generator_doesnt_retain_old_exc2(self): |
| 1808 | #Issue 28884#msg282532 |
nothing calls this directly
no test coverage detected