Skip to content

xfail tests that append to netCDF files with scipy #2021

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 2 commits into from
Mar 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -1404,8 +1404,23 @@ def create_zarr_target(self):
yield tmp


class ScipyWriteTest(CFEncodedDataTest, NetCDF3Only):

def test_append_write(self):
import scipy
if scipy.__version__ == '1.0.1':
pytest.xfail('https://github.com/scipy/scipy/issues/8625')
super(ScipyWriteTest, self).test_append_write()

def test_append_overwrite_values(self):
import scipy
if scipy.__version__ == '1.0.1':
pytest.xfail('https://github.com/scipy/scipy/issues/8625')
super(ScipyWriteTest, self).test_append_overwrite_values()


@requires_scipy
class ScipyInMemoryDataTest(CFEncodedDataTest, NetCDF3Only, TestCase):
class ScipyInMemoryDataTest(ScipyWriteTest, TestCase):
engine = 'scipy'

@contextlib.contextmanager
Expand All @@ -1431,7 +1446,7 @@ class ScipyInMemoryDataTestAutocloseTrue(ScipyInMemoryDataTest):


@requires_scipy
class ScipyFileObjectTest(CFEncodedDataTest, NetCDF3Only, TestCase):
class ScipyFileObjectTest(ScipyWriteTest, TestCase):
engine = 'scipy'

@contextlib.contextmanager
Expand Down Expand Up @@ -1459,7 +1474,7 @@ def test_pickle_dataarray(self):


@requires_scipy
class ScipyFilePathTest(CFEncodedDataTest, NetCDF3Only, TestCase):
class ScipyFilePathTest(ScipyWriteTest, TestCase):
engine = 'scipy'

@contextlib.contextmanager
Expand Down Expand Up @@ -2168,7 +2183,7 @@ def test_session(self):

@requires_scipy
@requires_pynio
class TestPyNio(CFEncodedDataTest, NetCDF3Only, TestCase):
class PyNioTest(ScipyWriteTest, TestCase):
def test_write_store(self):
# pynio is read-only for now
pass
Expand All @@ -2194,7 +2209,7 @@ def test_weakrefs(self):
assert_identical(actual, expected)


class TestPyNioAutocloseTrue(TestPyNio):
class PyNioTestAutocloseTrue(PyNioTest):
autoclose = True


Expand Down