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

Method test_async_gen_iteration_01

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

Source from the content-addressed store, hash-verified

177 return async_gen_result
178
179 def test_async_gen_iteration_01(self):
180 async def gen():
181 await awaitable()
182 a = yield 123
183 self.assertIs(a, None)
184 await awaitable()
185 yield 456
186 await awaitable()
187 yield 789
188
189 self.assertEqual(to_list(gen()), [123, 456, 789])
190
191 def test_async_gen_iteration_02(self):
192 async def gen():

Callers

nothing calls this directly

Calls 3

to_listFunction · 0.85
genFunction · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected