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

Function run_no_yield_async_fn

Lib/test/support/__init__.py:3102–3111  ·  view source on GitHub ↗
(async_fn, /, *args, **kwargs)

Source from the content-addressed store, hash-verified

3100 return False
3101
3102def run_no_yield_async_fn(async_fn, /, *args, **kwargs):
3103 coro = async_fn(*args, **kwargs)
3104 try:
3105 coro.send(None)
3106 except StopIteration as e:
3107 return e.value
3108 else:
3109 raise AssertionError("coroutine did not complete")
3110 finally:
3111 coro.close()
3112
3113
3114@types.coroutine

Callers 1

Calls 2

sendMethod · 0.45
closeMethod · 0.45

Tested by 1