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

Method test_await_6

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

Source from the content-addressed store, hash-verified

1013 run_async(foo())
1014
1015 def test_await_6(self):
1016 class Awaitable:
1017 def __await__(self):
1018 return iter([52])
1019
1020 async def foo():
1021 return (await Awaitable())
1022
1023 self.assertEqual(run_async(foo()), ([52], None))
1024
1025 def test_await_7(self):
1026 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