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

Method test_await_6

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

Source from the content-addressed store, hash-verified

1021 run_async(foo())
1022
1023 def test_await_6(self):
1024 class Awaitable:
1025 def __await__(self):
1026 return iter([52])
1027
1028 async def foo():
1029 return (await Awaitable())
1030
1031 self.assertEqual(run_async(foo()), ([52], None))
1032
1033 def test_await_7(self):
1034 class Awaitable:

Callers

nothing calls this directly

Calls 3

run_asyncFunction · 0.70
fooFunction · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected