Open
Description
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 😄