Skip to content

Avoid use of deprecated get= parameter in tests #2500

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 3 commits into from
Oct 23, 2018

Conversation

mrocklin
Copy link
Contributor

  • Fully documented, including whats-new.rst for all changes and api.rst for new API (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later)

@max-sixty
Copy link
Collaborator

Thanks @mrocklin

Anyone have any idea why Travis isn't running? Is it the GH issues from this morning? Looks like the latest run was a couple of days ago: https://travis-ci.org/pydata/xarray/pull_requests

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 22, 2018 via email

@pep8speaks
Copy link

Hello @mrocklin! Thanks for submitting the PR.

@mrocklin
Copy link
Contributor Author

I'm not sure that I understand the failure here. Can someone verify that this is related to these changes?

=================================== FAILURES ===================================
_____________________________ TestCfGrib.test_read _____________________________
self = <xarray.tests.test_backends.TestCfGrib object at 0x7fd47fc30b00>
    def test_read(self):
        expected = {'number': 2, 'time': 3, 'air_pressure': 2, 'latitude': 3,
                    'longitude': 4}
        with open_example_dataset('example.grib', engine='cfgrib') as ds:
>           assert ds.dims == expected
E           AssertionError: assert Frozen(Sorted...ngitude': 4})) == {'air_pressure...mber': 2, ...}
E             Full diff:
E             - Frozen(SortedKeysDict({'number': 2, 'time': 3, 'isobaricInhPa': 2, 'latitude': 3, 'longitude': 4}))
E             + {'air_pressure': 2, 'latitude': 3, 'longitude': 4, 'number': 2, 'time': 3}
xarray/tests/test_backends.py:2473: AssertionError
_____________________ TestCfGrib.test_read_filter_by_keys ______________________
self = <xarray.tests.test_backends.TestCfGrib object at 0x7fd4904b12b0>
    def test_read_filter_by_keys(self):
        kwargs = {'filter_by_keys': {'shortName': 't'}}
        expected = {'number': 2, 'time': 3, 'air_pressure': 2, 'latitude': 3,
                    'longitude': 4}
        with open_example_dataset('example.grib', engine='cfgrib',
                                  backend_kwargs=kwargs) as ds:
>           assert ds.dims == expected
E           AssertionError: assert Frozen(Sorted...ngitude': 4})) == {'air_pressure...mber': 2, ...}
E             Full diff:
E             - Frozen(SortedKeysDict({'number': 2, 'time': 3, 'isobaricInhPa': 2, 'latitude': 3, 'longitude': 4}))
E             + {'air_pressure': 2, 'latitude': 3, 'longitude': 4, 'number': 2, 'time': 3}
xarray/tests/test_backends.py:2483: AssertionError

@shoyer
Copy link
Member

shoyer commented Oct 23, 2018

I'm pretty sure that error is different, cc @alexamici

@shoyer shoyer merged commit 4a5d88d into pydata:master Oct 23, 2018
@shoyer
Copy link
Member

shoyer commented Oct 23, 2018

thanks @mrocklin !

@alexamici
Copy link
Collaborator

alexamici commented Oct 23, 2018

@shoyer you are right, I had to make a user-visible backward-incompatible change in cfgrib and Travis is getting the latest version.

I'll make a PR to fix the test.

Note that I don't expect to do any other backward-incompatible change this big and the test is going to be robust to version change from now on.

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.

5 participants