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

Method test_async_gen_aiter

Lib/test/test_asyncgen.py:731–739  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

729 self.check_async_iterator_anext(MyAsyncIterWithTypesCoro)
730
731 def test_async_gen_aiter(self):
732 async def gen():
733 yield 1
734 yield 2
735 g = gen()
736 async def consume():
737 return [i async for i in aiter(g)]
738 res = self.loop.run_until_complete(consume())
739 self.assertEqual(res, [1, 2])
740
741 def test_async_gen_aiter_class(self):
742 results = []

Callers

nothing calls this directly

Calls 4

consumeFunction · 0.85
genFunction · 0.70
run_until_completeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected