You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a shortcoming of the 3.x series, and is resolved in master. This happens in v3.x because each async fixture is run in a separate task, and is thus isolated from the actual test. The upcoming v4.0 runs each test along with its set of async fixtures within the same task.
It seems I cannot set a value of a
ContextVar
member from a fixture in pytest if that fixture is async.In the snippet below, I expect all tests to pass but
test_set_in_async_fixture
which depends on a async fixture fails.The text was updated successfully, but these errors were encountered: