-
-
Notifications
You must be signed in to change notification settings - Fork 206
Open
Description
input
def run_non_trapping_async_fn(*async_fn_args, **kwargs):
async_fn, *args = async_fn_args
with contextlib.closing(async_fn(*args, **kwargs).__await__()) as gen:
try:
gen.send(None)
raise AssertionError(f"{async_fn} did not stop")
except StopIteration as e:
return e.valueexpected output:
def run_non_trapping_async_fn(async_fn, /, *args, **kwargs):
with contextlib.closing(async_fn(*args, **kwargs).__await__()) as gen:
try:
gen.send(None)
raise AssertionError(f"{async_fn} did not stop")
except StopIteration as e:
return e.valueMetadata
Metadata
Assignees
Labels
No labels