Skip to content

Commit 6fd9558

Browse files
Backport PR #58719 on branch 2.2.x (CI: xfail test_to_xarray_index_types due to new 2024.5 release) (#58720)
Backport PR #58719: CI: xfail test_to_xarray_index_types due to new 2024.5 release Co-authored-by: Matthew Roeschke <[email protected]>
1 parent a8b5c5d commit 6fd9558

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pandas/tests/generic/test_to_xarray.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
date_range,
1010
)
1111
import pandas._testing as tm
12+
from pandas.util.version import Version
1213

1314
pytest.importorskip("xarray")
1415

@@ -29,11 +30,17 @@ def df(self):
2930
}
3031
)
3132

32-
def test_to_xarray_index_types(self, index_flat, df, using_infer_string):
33+
def test_to_xarray_index_types(self, index_flat, df, using_infer_string, request):
3334
index = index_flat
3435
# MultiIndex is tested in test_to_xarray_with_multiindex
3536
if len(index) == 0:
3637
pytest.skip("Test doesn't make sense for empty index")
38+
import xarray
39+
40+
if Version(xarray.__version__) >= Version("2024.5"):
41+
request.applymarker(
42+
pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/9026")
43+
)
3744

3845
from xarray import Dataset
3946

0 commit comments

Comments
 (0)