From b77d123edd1635718b62c3bb6c170526c1dd2ad8 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 23 Oct 2023 17:48:34 -0400 Subject: [PATCH] Fix `Context.result()` call to be in runtime scope --- tests/test_infected_asyncio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_infected_asyncio.py b/tests/test_infected_asyncio.py index 7674419..56b5fde 100644 --- a/tests/test_infected_asyncio.py +++ b/tests/test_infected_asyncio.py @@ -225,7 +225,7 @@ def test_context_spawns_aio_task_that_errors( await trio.sleep_forever() - return await ctx.result() + return await ctx.result() if parent_cancels: # bc the parent made the cancel request,