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
At the time, pytest-trio was the right place to do (2), but not anymore: since HypothesisWorks/hypothesis#2556, it's possible for Trio to ship a Hypothesis plugin which handles the registration if-and-only-if Hypothesis is imported. Here are the docs.
This is useful because it works even for users without pytest-trio installed or enabled (c.f. HypothesisWorks/hypothesis#3940), e.g. because they're using unittest or running a test function by hand in some debugging loop or the test function calls trio.run() internally, and it will allow pytest-trio to avoid importing Hypothesis if it wasn't otherwise going to be used (which is nice for performance).
The text was updated successfully, but these errors were encountered:
pytest-trio
does two things for property-based tests with Hypothesis:pytest-trio
is clearly the right place to do that.Random
instance so that the scheduler is deterministic and Hypothesis can replay failing examples (see Deterministic scheduling via Hypothesis pytest-trio#73 and Support deterministic scheduling #890).At the time,
pytest-trio
was the right place to do (2), but not anymore: since HypothesisWorks/hypothesis#2556, it's possible for Trio to ship a Hypothesis plugin which handles the registration if-and-only-if Hypothesis is imported. Here are the docs.This is useful because it works even for users without
pytest-trio
installed or enabled (c.f. HypothesisWorks/hypothesis#3940), e.g. because they're usingunittest
or running a test function by hand in some debugging loop or the test function callstrio.run()
internally, and it will allowpytest-trio
to avoid importing Hypothesis if it wasn't otherwise going to be used (which is nice for performance).The text was updated successfully, but these errors were encountered: