Hi team,
I'd like to propose adding Hypothesis
<https://hypothesis.readthedocs.io/en/latest/> as a test-time dependency.
From the documentation:
Hypothesis is a Python library for creating unit tests which are simpler to
> write and more powerful when run, finding edge cases in your code you
> wouldn’t have thought to look for.
We write property-based tests all the time, but I think Hypothesis can help
us write them faster and make them stronger. Apparently NumPy, pandas, and many
other projects <https://hypothesis.readthedocs.io/en/latest/usage.html> that
use Hypothesis think so, too.
I imagine one of the concerns will be test duration, but this is no
different from other parameterized tests, and we can use pytest markers
(`slow`, `xslow`) to limit that as always.
Another concern would be nondeterminism in the CI suite. To address this,
we've set up both a default deterministic profile and opt-in (via
environment variable) nondeterministic profile.
Please let us know your thoughts here and in the PR:
https://github.com/scipy/scipy/pull/18927
Matt