- Notifications
You must be signed in to change notification settings - Fork 175
Milestone
Description
I'm trying to figure out why this code sample isn't working. I'm not experienced with asyncio yet, so this is very likely a simple misunderstanding on my part.
from _contextvars import ContextVar import pytest blah = ContextVar("blah") @pytest.fixture async def my_context_var(): blah.set("hello") assert blah.get() == "hello" yield blah @pytest.mark.asyncio async def test_blah(my_context_var): assert my_context_var.get() == "hello" # this failsvaleshino, kalefranz, potykion, DasIch, nikicat and 33 more
Metadata
Metadata
Assignees
Labels
No labels