-
Notifications
You must be signed in to change notification settings - Fork 40
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
Test interp nominal lon #365
base: main
Are you sure you want to change the base?
Test interp nominal lon #365
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting in more work into polishing this up @JoranAngevaare! I would much prefer to keep this in pure pytest, but I might also be missing something here.
@@ -191,6 +193,57 @@ def test_replace_x_y_nominal_lat_lon(dask, nans): | |||
assert set(replaced_ds.lat.dims) == set(["x", "y"]) | |||
|
|||
|
|||
class TestReplaceXYNominalLatLon(TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not really familiar with unittest. Is there a specific reason not to use pytest fixtures (or plain functions) in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unittest comes with a few handy tools. I personally like it a lot because plain functions - in my experience - sometimes increase code duplication and add clutter for setting up some dummy data. Truthfully, I only use TestCase.assertRaises
and TestCase.assertTrue
which I can easily replace with some plain code, and this specific test is really simple to do without things from Unittest. I'll change it.
Fix test for
_interp_nominal_lon
This PR is some leftover work from #296 (and #300)
replace_x_y_nominal_lat_lon
does not work for > 360lon
coordinates #295._interp_nominal_lon
#296PR checks
replace_x_y_nominal_lat_lon
does not work for > 360lon
coordinates #295, Adding new contributors to CITATION.cff #358pre-commit run --all-files
whats-new.rst
api.rst