MCPcopy Index your code
hub / github.com/python/cpython / run1

Method run1

Lib/test/test_asyncgen.py:1036–1046  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1034 yield 4
1035
1036 async def run1():
1037 it = foo().__aiter__()
1038
1039 self.assertEqual(await it.__anext__(), 1)
1040 self.assertEqual(await it.__anext__(), 2)
1041 self.assertEqual(await it.__anext__(), 3)
1042 self.assertEqual(await it.__anext__(), 4)
1043 with self.assertRaises(StopAsyncIteration):
1044 await it.__anext__()
1045 with self.assertRaises(StopAsyncIteration):
1046 await it.__anext__()
1047
1048 async def run2():
1049 it = foo().__aiter__()

Callers

nothing calls this directly

Calls 5

fooFunction · 0.70
__aiter__Method · 0.45
assertEqualMethod · 0.45
__anext__Method · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected