diff --git a/tests/test_contextvars.py b/tests/test_contextvars.py index 54257fca..892f7056 100644 --- a/tests/test_contextvars.py +++ b/tests/test_contextvars.py @@ -56,11 +56,11 @@ async def test_nested_async_bind(self, event_loop): async def coro(): bind_contextvars(a=1) - await event_loop.create_task(nested_coro()) - return merge_contextvars(None, None, {"b": 2}) + return await event_loop.create_task(nested_coro()) async def nested_coro(): bind_contextvars(c=3) + return merge_contextvars(None, None, {"b": 2}) assert {"a": 1, "b": 2, "c": 3} == await event_loop.create_task(coro())