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

Method test_await_8

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

Source from the content-addressed store, hash-verified

1034 self.assertEqual(run_async(foo()), ([42], 100))
1035
1036 def test_await_8(self):
1037 class Awaitable:
1038 pass
1039
1040 async def foo(): return await Awaitable()
1041
1042 with self.assertRaisesRegex(
1043 TypeError, "'Awaitable' object can't be awaited"):
1044
1045 run_async(foo())
1046
1047 def test_await_9(self):
1048 def wrap():

Callers

nothing calls this directly

Calls 3

run_asyncFunction · 0.85
assertRaisesRegexMethod · 0.80
fooFunction · 0.70

Tested by

no test coverage detected