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

Method test_async_gen_exception_05

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

Source from the content-addressed store, hash-verified

249 ai.__anext__().__next__()
250
251 def test_async_gen_exception_05(self):
252 async def gen():
253 yield 123
254 raise StopAsyncIteration
255
256 with self.assertRaisesRegex(RuntimeError,
257 'async generator.*StopAsyncIteration'):
258 to_list(gen())
259
260 def test_async_gen_exception_06(self):
261 async def gen():

Callers

nothing calls this directly

Calls 3

to_listFunction · 0.85
assertRaisesRegexMethod · 0.80
genFunction · 0.70

Tested by

no test coverage detected