Skip to content

Commit c4c683f

Browse files
authored
xfail tests that append to netCDF files with scipy (#2021)
* xfail tests that append to netCDF files with scipy These are broken by SciPy 1.0.1. For details, see #2019 * xfail pynio tests that use scipy too
1 parent 7c2c43c commit c4c683f

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

xarray/tests/test_backends.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,8 +1404,23 @@ def create_zarr_target(self):
14041404
yield tmp
14051405

14061406

1407+
class ScipyWriteTest(CFEncodedDataTest, NetCDF3Only):
1408+
1409+
def test_append_write(self):
1410+
import scipy
1411+
if scipy.__version__ == '1.0.1':
1412+
pytest.xfail('https://github.com/scipy/scipy/issues/8625')
1413+
super(ScipyWriteTest, self).test_append_write()
1414+
1415+
def test_append_overwrite_values(self):
1416+
import scipy
1417+
if scipy.__version__ == '1.0.1':
1418+
pytest.xfail('https://github.com/scipy/scipy/issues/8625')
1419+
super(ScipyWriteTest, self).test_append_overwrite_values()
1420+
1421+
14071422
@requires_scipy
1408-
class ScipyInMemoryDataTest(CFEncodedDataTest, NetCDF3Only, TestCase):
1423+
class ScipyInMemoryDataTest(ScipyWriteTest, TestCase):
14091424
engine = 'scipy'
14101425

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

14321447

14331448
@requires_scipy
1434-
class ScipyFileObjectTest(CFEncodedDataTest, NetCDF3Only, TestCase):
1449+
class ScipyFileObjectTest(ScipyWriteTest, TestCase):
14351450
engine = 'scipy'
14361451

14371452
@contextlib.contextmanager
@@ -1459,7 +1474,7 @@ def test_pickle_dataarray(self):
14591474

14601475

14611476
@requires_scipy
1462-
class ScipyFilePathTest(CFEncodedDataTest, NetCDF3Only, TestCase):
1477+
class ScipyFilePathTest(ScipyWriteTest, TestCase):
14631478
engine = 'scipy'
14641479

14651480
@contextlib.contextmanager
@@ -2168,7 +2183,7 @@ def test_session(self):
21682183

21692184
@requires_scipy
21702185
@requires_pynio
2171-
class TestPyNio(CFEncodedDataTest, NetCDF3Only, TestCase):
2186+
class PyNioTest(ScipyWriteTest, TestCase):
21722187
def test_write_store(self):
21732188
# pynio is read-only for now
21742189
pass
@@ -2194,7 +2209,7 @@ def test_weakrefs(self):
21942209
assert_identical(actual, expected)
21952210

21962211

2197-
class TestPyNioAutocloseTrue(TestPyNio):
2212+
class PyNioTestAutocloseTrue(PyNioTest):
21982213
autoclose = True
21992214

22002215

0 commit comments

Comments
 (0)