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

Method test_func_4

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

Source from the content-addressed store, hash-verified

565
566 @unittest.expectedFailure # TODO: RUSTPYTHON; RuntimeError: coroutine raised StopIteration
567 def test_func_4(self):
568 async def foo():
569 raise StopIteration
570 coro = foo()
571
572 check = lambda: self.assertRaisesRegex(
573 TypeError, "'coroutine' object is not iterable")
574
575 with check():
576 list(coro)
577
578 with check():
579 tuple(coro)
580
581 with check():
582 sum(coro)
583
584 with check():
585 iter(coro)
586
587 with check():
588 for i in coro:
589 pass
590
591 with check():
592 [i for i in coro]
593
594 coro.close()
595
596 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: TypeError not raised
597 def test_func_5(self):

Callers

nothing calls this directly

Calls 7

listClass · 0.85
iterFunction · 0.85
assertRaisesRegexMethod · 0.80
fooFunction · 0.70
checkFunction · 0.70
sumFunction · 0.50
closeMethod · 0.45

Tested by

no test coverage detected