()
| 1046 | await it.__anext__() |
| 1047 | |
| 1048 | async def run2(): |
| 1049 | it = foo().__aiter__() |
| 1050 | |
| 1051 | self.assertEqual(await it.__anext__(), 1) |
| 1052 | self.assertEqual(await it.__anext__(), 2) |
| 1053 | try: |
| 1054 | it.__anext__().throw(ZeroDivisionError) |
| 1055 | except StopIteration as ex: |
| 1056 | self.assertEqual(ex.args[0], 1000) |
| 1057 | else: |
| 1058 | self.fail('StopIteration was not raised') |
| 1059 | self.assertEqual(await it.__anext__(), 4) |
| 1060 | with self.assertRaises(StopAsyncIteration): |
| 1061 | await it.__anext__() |
| 1062 | |
| 1063 | self.loop.run_until_complete(run1()) |
| 1064 | self.loop.run_until_complete(run2()) |
nothing calls this directly
no test coverage detected