Re: Allow use of Hypothesis for property-based tests
Kai Striega <[email protected]> Thu, 3 Aug 2023 06:04:16 +0800
| Newsgroups | gmane.comp.python.scientific.devel |
|---|---|
| Message-ID | <CAPDXd15z-h5OVOc+4CdDM5kODbJGxh7J9riMmZRQdc5+Tfw2-g@mail.gmail.com> |
+1 from me, I’ma big fan of hypothesis On Thu, 3 Aug 2023 at 06:00, Matt Haberland <[email protected]> wrote: > 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 > > _______________________________________________ > SciPy-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/scipy-dev.python.org/ > Member address: [email protected] > _______________________________________________ SciPy-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/scipy-dev.python.org/ Member address: [email protected]