Skip to content

Commit 1119bc9

Browse files
committed
Adjust tests
1 parent b3ac8ee commit 1119bc9

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

pandas/tests/generic/test_to_xarray.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
DataFrame,
77
MultiIndex,
88
Series,
9-
StringDtype,
109
date_range,
1110
)
1211
import pandas._testing as tm
@@ -36,6 +35,8 @@ def test_to_xarray_index_types(self, index_flat, df, request):
3635
# MultiIndex is tested in test_to_xarray_with_multiindex
3736
if len(index) == 0:
3837
pytest.skip("Test doesn't make sense for empty index")
38+
if Version(xarray.__version__) < Version("2025.9.0"):
39+
pytest.skip("Xarray bug https://github.com/pydata/xarray/issues/9661")
3940

4041
df.index = index[:4]
4142
df.index.name = "foo"
@@ -82,19 +83,8 @@ def test_to_xarray_with_multiindex(self, df, using_infer_string):
8283

8384
class TestSeriesToXArray:
8485
def test_to_xarray_index_types(self, index_flat, request):
85-
index = index_flat
86-
if (
87-
isinstance(index.dtype, StringDtype)
88-
and index.dtype.storage == "pyarrow"
89-
and Version(xarray.__version__) < Version("2025.6.0")
90-
):
91-
request.applymarker(
92-
pytest.mark.xfail(
93-
reason="xarray calling reshape of ArrowExtensionArray",
94-
raises=NotImplementedError,
95-
)
96-
)
9786
# MultiIndex is tested in test_to_xarray_with_multiindex
87+
index = index_flat
9888

9989
ser = Series(range(len(index)), index=index, dtype="int64")
10090
ser.index.name = "foo"

pandas/tests/io/test_fsspec.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from pandas._config import using_string_dtype
77

88
from pandas.compat import HAS_PYARROW
9+
from pandas.compat.pyarrow import pa_version_under14p0
910

1011
from pandas import (
1112
DataFrame,
@@ -179,7 +180,8 @@ def test_excel_options(fsspectest):
179180

180181

181182
@pytest.mark.xfail(
182-
using_string_dtype() and HAS_PYARROW, reason="TODO(infer_string) fastparquet"
183+
using_string_dtype() and HAS_PYARROW and not pa_version_under14p0,
184+
reason="TODO(infer_string) fastparquet",
183185
)
184186
def test_to_parquet_new_file(cleared_fs, df1):
185187
"""Regression test for writing to a not-yet-existent GCS Parquet file."""

0 commit comments

Comments
 (0)