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

Method test_func_15

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

Source from the content-addressed store, hash-verified

774
775 @unittest.expectedFailure # TODO: RUSTPYTHON; StopIteration
776 def test_func_15(self):
777 # See http://bugs.python.org/issue25887 for details
778
779 async def spammer():
780 return 'spam'
781 async def reader(coro):
782 return await coro
783
784 spammer_coro = spammer()
785
786 with self.assertRaisesRegex(StopIteration, 'spam'):
787 reader(spammer_coro).send(None)
788
789 with self.assertRaisesRegex(RuntimeError,
790 'cannot reuse already awaited coroutine'):
791 reader(spammer_coro).send(None)
792
793 @unittest.expectedFailure # TODO: RUSTPYTHON; StopIteration
794 def test_func_16(self):

Callers

nothing calls this directly

Calls 3

readerFunction · 0.85
assertRaisesRegexMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected