-
Notifications
You must be signed in to change notification settings - Fork 2
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
pytest <single-test>
fails with pytest.PytestAssertRewriteWarning: Module already imported so cannot be rewritten: anyio
#88
Comments
Hey thanks for bringing this to my attention! I'm wondering if you have a plugin or something in your config that's not compatible? I'm not familiar with that library. Supposedly importing pytest first should fix this, but I would think that's how its being ran? Does it work if you do |
The behavior is sadly the same with |
I see a couple things:
You can also try disabling the anyio plugin. I'm guessing it's |
You're right, we have all warnings turned up to errors. Suppressing this one unblocks me.
We aren't using it directly.
I'm not sure how to use this advice (particularly the bit about loading order) given anyio isn't a plugin. |
By the way, after suppressing the warning I get a new failure mode when I run the tests for the second time. EDIT: gist |
Based on the docs it appears to have a plugin that I'm guessing is executed automatically |
Have you tried setting pytest to the version that matches what this library is using? |
I haven't - I'm on pytest 8.2.2. What would it take to make this compatible with pytest 8? |
Very cool project. Sadly it seems not to work with my project and doesn't emit much information.
The text was updated successfully, but these errors were encountered: