-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async fixtures do not support autouse=True
#123
Comments
autouse=True
autouse=True
autouse=True
I think the issue is that when we scan through to find and run all the trio fixtures, we do that by scanning over the test's kwargs, and I guess autouse fixtures don't show up in kwargs? The relevant code is in |
This does work with pytest-anyio, so we can likely just copy over the relevant code from over there. |
Async fixtures defined with
autouse
aren't automatically used. E.g.I'm sure this is a side-effect of the trio-fixture workaround approach explained in the docs, but it still might be possible to find those fixtures and make them work. If not, I think this rub is at least worth specifically mentioning in the docs.
The text was updated successfully, but these errors were encountered: