- Notifications
You must be signed in to change notification settings - Fork176
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_contextvarsimportContextVarimportpytestblah=ContextVar("blah")@pytest.fixtureasyncdefmy_context_var():blah.set("hello")assertblah.get()=="hello"yieldblah@pytest.mark.asyncioasyncdeftest_blah(my_context_var):assertmy_context_var.get()=="hello"# this fails
Metadata
Metadata
Assignees
Labels
No labels