Skip to content

Commit f4ebbfe

Browse files
mathausedcherian
andauthored
un-xfail tests that append to netCDF files with scipy (#3805)
* remove ScipyWriteBase class * add whats new Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
1 parent 203c3f4 commit f4ebbfe

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

doc/whats-new.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ Internal Changes
9595
By `Bruno Pagani <https://github.com/ArchangeGabriel>`_.
9696
- Updated Azure CI MacOS image, given pending removal.
9797
By `Maximilian Roos <https://github.com/max-sixty>`_
98+
- Removed xfails for scipy 1.0.1 for tests that append to netCDF files (:pull:`3805`).
99+
By `Mathias Hauser <https://github.com/mathause>`_.
98100
- Removed conversion to :py:class:`pandas.Panel`, given its removal in pandas
99101
in favor of xarray's objects.
100102
By `Maximilian Roos <https://github.com/max-sixty>`_

xarray/tests/test_backends.py

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,24 +1979,8 @@ def create_zarr_target(self):
19791979
yield tmp
19801980

19811981

1982-
class ScipyWriteBase(CFEncodedBase, NetCDF3Only):
1983-
def test_append_write(self):
1984-
import scipy
1985-
1986-
if scipy.__version__ == "1.0.1":
1987-
pytest.xfail("https://github.com/scipy/scipy/issues/8625")
1988-
super().test_append_write()
1989-
1990-
def test_append_overwrite_values(self):
1991-
import scipy
1992-
1993-
if scipy.__version__ == "1.0.1":
1994-
pytest.xfail("https://github.com/scipy/scipy/issues/8625")
1995-
super().test_append_overwrite_values()
1996-
1997-
19981982
@requires_scipy
1999-
class TestScipyInMemoryData(ScipyWriteBase):
1983+
class TestScipyInMemoryData(CFEncodedBase, NetCDF3Only):
20001984
engine = "scipy"
20011985

20021986
@contextlib.contextmanager
@@ -2017,7 +2001,7 @@ def test_bytes_pickle(self):
20172001

20182002

20192003
@requires_scipy
2020-
class TestScipyFileObject(ScipyWriteBase):
2004+
class TestScipyFileObject(CFEncodedBase, NetCDF3Only):
20212005
engine = "scipy"
20222006

20232007
@contextlib.contextmanager
@@ -2050,7 +2034,7 @@ def test_pickle_dataarray(self):
20502034

20512035

20522036
@requires_scipy
2053-
class TestScipyFilePath(ScipyWriteBase):
2037+
class TestScipyFilePath(CFEncodedBase, NetCDF3Only):
20542038
engine = "scipy"
20552039

20562040
@contextlib.contextmanager
@@ -3317,7 +3301,7 @@ def test_session(self):
33173301

33183302
@requires_scipy
33193303
@requires_pynio
3320-
class TestPyNio(ScipyWriteBase):
3304+
class TestPyNio(CFEncodedBase, NetCDF3Only):
33213305
def test_write_store(self):
33223306
# pynio is read-only for now
33233307
pass

0 commit comments

Comments
 (0)