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

Method test_await_7

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

Source from the content-addressed store, hash-verified

1023 self.assertEqual(run_async(foo()), ([52], None))
1024
1025 def test_await_7(self):
1026 class Awaitable:
1027 def __await__(self):
1028 yield 42
1029 return 100
1030
1031 async def foo():
1032 return (await Awaitable())
1033
1034 self.assertEqual(run_async(foo()), ([42], 100))
1035
1036 def test_await_8(self):
1037 class Awaitable:

Callers

nothing calls this directly

Calls 3

run_asyncFunction · 0.85
fooFunction · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected