MCPcopy Index your code
hub / github.com/RustPython/RustPython / consume

Method consume

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

Source from the content-addressed store, hash-verified

640 def _check_async_iterator_anext(self, ait_class, anext):
641 g = ait_class()
642 async def consume():
643 results = []
644 results.append(await anext(g))
645 results.append(await anext(g))
646 results.append(await anext(g, 'buckle my shoe'))
647 return results
648 res = self.loop.run_until_complete(consume())
649 self.assertEqual(res, [1, 2, 'buckle my shoe'])
650 with self.assertRaises(StopAsyncIteration):

Callers

nothing calls this directly

Calls 3

anextFunction · 0.85
aiterFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected