-
Notifications
You must be signed in to change notification settings - Fork 586
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
Folder ".hypothesis" appears after "pytest" run but I don't use hypothesis #3836
Comments
|
We're very careful to only create that folder when Hypothesis is used, not just imported, so my guess is that you have a pytest plugin which actually invokes some Hypothesis code. Can you share a minimal reproducible example, or at least paste in all the output from running (in fact one quick way to check would be to |
|
Thanks for your reply. It might be The docu itself says "AnyIO also comes with its own pytest plugin which also supports asynchronous fixtures. It even works with the popular Hypothesis library." |
|
That sounds like a likely culprit. You might find some additional information in the stacktrace by forcing directory creation to fail: |
No stacktrace just a fallback behavior. I opened an Issue at anyio project. |
Try |
Maybe you can jump in there. It seems I lowered my reputation there. 😄 |
|
...actually, @Zac-HD, the minimal reproducer: [edit] Running with |
|
The anyio maintainers seems to be not happy. |
|
@buhtz Don't worry, the anyio was closed as "not our fault/problem" which seems right. Just figuring out where the source of the problem lies. The create-on-import behaviour is a bug and will be fixed. |
|
FWIW: In my case, it seems to be the pydantic plugin that triggers this through This seems like fairly standard behaviour for a plugin. |
|
Sorry I don't understand the last comment. In the end I put this into my pyproject.toml to block this one specific plugin. But I don't know who installed or imported it. |
|
Thanks for tracking this down @jobh! Two mitigations to avoid this situation in future:
@buhtz, thanks for reporting this and bearing with us as we worked out what combination of interacting libraries were responsible! It sounds like disabling Hypothesis' pytest plugin is working for now, and once we get a fix out you shouldn't even need that. |
|
Sounds good @Zac-HD! We can even make the The same flag could be used for the warnings btw; it would improve locality of the warning by warning immediately instead of afterwards. |
|
I'll throw together a PR later |
I don't use hypothesis. But when I run pytest on my own package the "hypothesis" plugin seems to be active. At the end a folder named
.hypothesisappears in my project folder.A assume that some other pip packages do have hypothesis as an dependency and that is why it exists in my system. Anyway I don't want to have it run on ever use of pytest.
Why does it run? I never configured it or import it in my current project.
The text was updated successfully, but these errors were encountered: