-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add a suite of property-based tests with Hypothesis #1846
Comments
Reopening this issue as there is still a list of possible TODOs, as per @shoyer comment:
|
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
@rdturnermtl wrote a Hypothesis extension for Xarray, which is at least a nice demo of what's possible. If Xarray contributors want to keep working on this (#3283 seems stalled?) I'd be happy to help, since I'm both invested in Xarray working and would like to ship a |
Hypothesis is a library for writing property-based tests in Python: you describe input data and make assertions that should be true for all examples, then Hypothesis tries to find a counterexample. This came up in #1840, because
data == decode(encode(data))
is a classic property.We could add a (initially small) suite of property-based tests, to complement the traditional example-based tests Xarray is already using. Keeping them in independent files will ensure that they run in CI but the dependency on Hypothesis remains optional for local development.
I have moved jobs and don't have time to do this myself, but I'd be very happy to help anyone who does 😄
The text was updated successfully, but these errors were encountered: