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

Method test_await_8

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

Source from the content-addressed store, hash-verified

1042 self.assertEqual(run_async(foo()), ([42], 100))
1043
1044 def test_await_8(self):
1045 class Awaitable:
1046 pass
1047
1048 async def foo(): return await Awaitable()
1049
1050 with self.assertRaisesRegex(
1051 TypeError, "'Awaitable' object can't be awaited"):
1052
1053 run_async(foo())
1054
1055 def test_await_9(self):
1056 def wrap():

Callers

nothing calls this directly

Calls 3

assertRaisesRegexMethod · 0.80
run_asyncFunction · 0.70
fooFunction · 0.70

Tested by

no test coverage detected