From abe31e9e2c7bd36f8bc05af0ba2e7d96b74a6be2 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 76744198..56b5fde5 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,