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

Method test_func_15

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

Source from the content-addressed store, hash-verified

770 c.close()
771
772 def test_func_15(self):
773 # See http://bugs.python.org/issue25887 for details
774
775 async def spammer():
776 return 'spam'
777 async def reader(coro):
778 return await coro
779
780 spammer_coro = spammer()
781
782 with self.assertRaisesRegex(StopIteration, 'spam'):
783 reader(spammer_coro).send(None)
784
785 with self.assertRaisesRegex(RuntimeError,
786 'cannot reuse already awaited coroutine'):
787 reader(spammer_coro).send(None)
788
789 def test_func_16(self):
790 # See http://bugs.python.org/issue25887 for details

Callers

nothing calls this directly

Calls 3

readerFunction · 0.85
assertRaisesRegexMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected