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

Method test_func_6

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

Source from the content-addressed store, hash-verified

617 self.assertEqual(next(iter(bar())), 1)
618
619 def test_func_6(self):
620 @types.coroutine
621 def bar():
622 yield 1
623 yield 2
624
625 async def foo():
626 await bar()
627
628 f = foo()
629 self.assertEqual(f.send(None), 1)
630 self.assertEqual(f.send(None), 2)
631 with self.assertRaises(StopIteration):
632 f.send(None)
633
634 def test_func_7(self):
635 async def bar():

Callers

nothing calls this directly

Calls 4

fooFunction · 0.70
assertEqualMethod · 0.45
sendMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected