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

Method test_asyncio_run_raises

Lib/test/test_asyncio/test_runners.py:85–91  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 self.assertEqual(asyncio.run(main()), 42)
84
85 def test_asyncio_run_raises(self):
86 async def main():
87 await asyncio.sleep(0)
88 raise ValueError('spam')
89
90 with self.assertRaisesRegex(ValueError, 'spam'):
91 asyncio.run(main())
92
93 def test_asyncio_run_only_coro(self):
94 for o in {1, lambda: None}:

Callers

nothing calls this directly

Calls 3

assertRaisesRegexMethod · 0.80
mainFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected