Skip to content
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

Fix backend test classes so they actually run #2479

Merged
merged 2 commits into from
Oct 11, 2018

Conversation

shoyer
Copy link
Member

@shoyer shoyer commented Oct 11, 2018

We accidentally stopped running many backend tests when we merged #2467,
because they no longer inherited from untitest.TestCase and didn't have a
name starting with "Test".

This PR renames the tests so they actually run. I also fixed a bug with the
pseudonetcdf backend that appears to have been introduced by a bad merge in
#2261. It wasn't caught because the tests weren't actually running.

cc @max-sixty

We accidentally stopped running many backend tests when we merged GH2467,
because they no longer inherited from untitest.TestCase and didn't have a
name starting with "Test".

This PR renames the tests so they actually run. I also fixed a bug with the
pseudonetcdf backend that appears to have been introduced by a bad merge in
GH2261. It wasn't caught because the tests weren't actually running.
@pep8speaks
Copy link

Hello @shoyer! Thanks for submitting the PR.

@max-sixty
Copy link
Collaborator

Good catch!

I'm sorry I missed this. I should have compared the total number of tests running given it was a broad change to the tests.

Here's a patch to make the current tests pass:

diff --git a/xarray/tests/test_conventions.py b/xarray/tests/test_conventions.py
index a067d01a..5fa518f5 100644
--- a/xarray/tests/test_conventions.py
+++ b/xarray/tests/test_conventions.py
@@ -18,7 +18,7 @@ from xarray.testing import assert_identical
 from . import (
     assert_array_equal, raises_regex, requires_cftime_or_netCDF4,
     requires_dask, requires_netCDF4)
-from .test_backends import CFEncodedDataTest
+from .test_backends import CFEncodedBase
 
 
 class TestBoolTypeArray(object):
@@ -255,7 +255,7 @@ class CFEncodedInMemoryStore(WritableCFDataStore, InMemoryDataStore):
 
 
 @requires_netCDF4
-class TestCFEncodedDataStore(CFEncodedDataTest):
+class TestCFEncodedDataStore(CFEncodedBase):
     @contextlib.contextmanager
     def create_store(self):
         yield CFEncodedInMemoryStore()

@shoyer
Copy link
Member Author

shoyer commented Oct 11, 2018

There's a real test failure with dask-dev, but it's unrelated.

@shoyer shoyer merged commit 4bad455 into pydata:master Oct 11, 2018
@shoyer shoyer deleted the fixup-backend-tests branch October 11, 2018 21:20
@max-sixty
Copy link
Collaborator

Thanks @shoyer !

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.

3 participants