-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use xarray.testing.assert_allclose #104
Comments
I'm generally all for using
I'm hoping we can improve performance by working on #43 soon, and then the second point will be irrelevant. |
No - I mean the Dataset could point to an arbitrarily large amount of data so it's truncated quickly. In general I'm not a fan of hardcoding expected data values into the testing code... |
But having these tests with expected data values has proven really, really useful when refactoring the code. These are the tests that have caught most of my bugs. |
At the same time they are the most annoying tests to maintain if you change small things 1) in the code (like a different interpolation method) or 2) in the test datasets that make the expected values change. But at least we can keep track of changes in the input fields to ROMS. Creating accurate input fields is the major purpose of ROMS-Tools (at least of |
Then perhaps we should be saving very small output files as regression tests. |
Yes, that would definitely be better. I will work on this. |
Here we are using
np.allclose
over and overroms-tools/roms_tools/tests/test_boundary_forcing.py
Line 396 in c1e89be
but we could just compare the whole dataset at once using
xarray.testing.assert_allclose
The text was updated successfully, but these errors were encountered: