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

Method test_async_gen_exception_10

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

Source from the content-addressed store, hash-verified

340 self.compare_generators(sync_gen(), async_gen())
341
342 def test_async_gen_exception_10(self):
343 async def gen():
344 yield 123
345 with self.assertRaisesRegex(TypeError,
346 "non-None value .* async generator"):
347 gen().__anext__().send(100)
348
349 def test_async_gen_exception_11(self):
350 def sync_gen():

Callers

nothing calls this directly

Calls 4

assertRaisesRegexMethod · 0.80
genFunction · 0.70
sendMethod · 0.45
__anext__Method · 0.45

Tested by

no test coverage detected