(self)
| 1791 | |
| 1792 | @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: "an invalid object from __anext__" does not match "'F' object is not an iterator" |
| 1793 | def test_for_11(self): |
| 1794 | class F: |
| 1795 | def __aiter__(self): |
| 1796 | return self |
| 1797 | def __anext__(self): |
| 1798 | return self |
| 1799 | def __await__(self): |
| 1800 | 1 / 0 |
| 1801 | |
| 1802 | async def main(): |
| 1803 | async for _ in F(): |
| 1804 | pass |
| 1805 | |
| 1806 | with self.assertRaisesRegex(TypeError, |
| 1807 | 'an invalid object from __anext__') as c: |
| 1808 | main().send(None) |
| 1809 | |
| 1810 | err = c.exception |
| 1811 | self.assertIsInstance(err.__cause__, ZeroDivisionError) |
| 1812 | |
| 1813 | def test_for_tuple(self): |
| 1814 | class Done(Exception): pass |
nothing calls this directly
no test coverage detected