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

Method test_func_6

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

Source from the content-addressed store, hash-verified

619 self.assertEqual(next(iter(bar())), 1)
620
621 def test_func_6(self):
622 @types.coroutine
623 def bar():
624 yield 1
625 yield 2
626
627 async def foo():
628 await bar()
629
630 f = foo()
631 self.assertEqual(f.send(None), 1)
632 self.assertEqual(f.send(None), 2)
633 with self.assertRaises(StopIteration):
634 f.send(None)
635
636 def test_func_7(self):
637 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