Skip to content

fix tests #81

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

Merged
merged 8 commits into from
Sep 11, 2020
Merged

fix tests #81

merged 8 commits into from
Sep 11, 2020

Conversation

jukent
Copy link
Contributor

@jukent jukent commented Sep 10, 2020

I found a bug in test_getitem_errors which needed a deep copy before deleting the attributes. Other issues have to do with xr.coarsen (particularly in test_kwargs_expand_key_to_multiple_keys) that was fixed by this PR (pydata/xarray#4360). Once the newest version of Xarray is released these tests will not have to be run in a specific order to pass.

Closes #47

@dcherian
Copy link
Contributor

Ah this makes sense. Can you move test_dicts to the end of the file and see if tests pass? Or have you done that already? Also you can give yourself credit in whats-new.rst

@jukent
Copy link
Contributor Author

jukent commented Sep 10, 2020

Ah this makes sense. Can you move test_dicts to the end of the file and see if tests pass? Or have you done that already? Also you can give yourself credit in whats-new.rst

It will not pass unless we use the most current version of Xarray on Github (with the recent PR).

I can add this to whats-new.rst -- should I do so under v0.2.1 or create the v0.2.2 header?

@dcherian
Copy link
Contributor

It will not pass unless we use the most current version of Xarray on Github (with the recent PR).

The coarsen tests are skipped so that should not be needed?

LEt'add a whats-new note under 0.2.2

@jukent
Copy link
Contributor Author

jukent commented Sep 10, 2020

The coarsen tests are skipped so that should not be needed?

Hmm that's interesting. If I run "pip install git+git://github.com/pydata/xarray.git", test_dicts passes when I run the tests locally - no matter where it is in the file. But if I install the current version of Xarray if fails if it is after test_kwargs_expand_key_to_multiple_keys or passes if it is before it. Are you sure that test is skipped?

@jukent
Copy link
Contributor Author

jukent commented Sep 11, 2020

@dcherian I ran pytest -rxXs and this was the output:

XFAIL cf_xarray/tests/test_accessor.py::test_getitem[area-cell_area-obj0]
  measures not implemented for dataset
XFAIL cf_xarray/tests/test_accessor.py::test_getitem[area-cell_area-obj1]
  measures not implemented for dataset
XFAIL cf_xarray/tests/test_accessor.py::test_getitem[area-cell_area-obj2]
  measures not implemented for dataset
XFAIL cf_xarray/tests/test_accessor.py::test_getitem[area-cell_area-obj3]
  measures not implemented for dataset
SKIPPED [4] cf_xarray/tests/test_accessor.py:120: xarray GH4120. any test after this will fail since attrs are lost

So one coarsen test is being skipped, but the test_kwargs_expand_key_to_multiple_keys also uses coarsen and is being run.

@dcherian
Copy link
Contributor

ah nice debugging skills!

Let's skip that second coarsen test too then.

@dcherian
Copy link
Contributor

Great. Thanks @jukent

@dcherian dcherian merged commit 235acac into xarray-contrib:main Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix tests
2 participants