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
I am a long-time user of hypothesis. Thank you very much for the great project! It is amazing.
Unfortunately, I somehow stopped to use hypothesis because it seems to be incompatible with pytest's function scoped fixtures. This means I often end up implementing test data generation on my own, which is much less elegant and much less comprehensive as it could be by using hypothesis. I am writing this issue to kindly ask whether there are updates or new workarounds I am not aware of.
I am aware of #377 and that it was closed some years ago. I am also aware of the documentation and possibility to suppress the HealthCheck and proceed with executing the function scoped fixture just once.
However, I would consider it not elegant to always tidy up at the end of a test using a function scoped fixture. Also, it might be error prone. I therefore wanted to ask whether there are some improvements I missed or that are planned.
Again, thank you for that fascinating library!
The text was updated successfully, but these errors were encountered:
Hi Max! No changes to the situation in the docs - function-scoped fixtures are only executed once for all the examples; if that's OK you can just suppress the healthcheck. If not, then you'd need to find a non-fixture approach such as a context manager. We don't have any plans to change this, though I'd probably accept a PR which did so.
Hello,
I am a long-time user of
hypothesis
. Thank you very much for the great project! It is amazing.Unfortunately, I somehow stopped to use
hypothesis
because it seems to be incompatible withpytest
's function scoped fixtures. This means I often end up implementing test data generation on my own, which is much less elegant and much less comprehensive as it could be by usinghypothesis
. I am writing this issue to kindly ask whether there are updates or new workarounds I am not aware of.I am aware of #377 and that it was closed some years ago. I am also aware of the documentation and possibility to suppress the HealthCheck and proceed with executing the function scoped fixture just once.
However, I would consider it not elegant to always tidy up at the end of a test using a function scoped fixture. Also, it might be error prone. I therefore wanted to ask whether there are some improvements I missed or that are planned.
Again, thank you for that fascinating library!
The text was updated successfully, but these errors were encountered: