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

Method test_func_7

Lib/test/test_coroutines.py:634–648  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

632 f.send(None)
633
634 def test_func_7(self):
635 async def bar():
636 return 10
637 coro = bar()
638
639 def foo():
640 yield from coro
641
642 with self.assertRaisesRegex(
643 TypeError,
644 "cannot 'yield from' a coroutine object in "
645 "a non-coroutine generator"):
646 list(foo())
647
648 coro.close()
649
650 def test_func_8(self):
651 @types.coroutine

Callers

nothing calls this directly

Calls 5

listClass · 0.85
assertRaisesRegexMethod · 0.80
fooFunction · 0.70
barFunction · 0.50
closeMethod · 0.45

Tested by

no test coverage detected