Skip to content

Commit 0dbf92e

Browse files
committed
clean more tests
1 parent 92c2077 commit 0dbf92e

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

pandas/tests/generic/test_to_xarray.py

Lines changed: 6 additions & 12 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,12 @@ 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+
elif Version(xarray.__version__) <= Version("2024.10.0"):
39+
request.applymarker(
40+
pytest.mark.xfail(
41+
reason="Type or shape incorrect.",
42+
)
43+
)
3944

4045
df.index = index[:4]
4146
df.index.name = "foo"
@@ -83,17 +88,6 @@ def test_to_xarray_with_multiindex(self, df, using_infer_string):
8388
class TestSeriesToXArray:
8489
def test_to_xarray_index_types(self, index_flat, request):
8590
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-
)
9791
# MultiIndex is tested in test_to_xarray_with_multiindex
9892

9993
ser = Series(range(len(index)), index=index, dtype="int64")

pandas/tests/io/test_fsspec.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
from pandas._config import using_string_dtype
77

8-
from pandas.compat import HAS_PYARROW
9-
108
from pandas import (
119
DataFrame,
1210
date_range,
@@ -178,9 +176,6 @@ def test_excel_options(fsspectest):
178176
assert fsspectest.test[0] == "read"
179177

180178

181-
@pytest.mark.xfail(
182-
using_string_dtype() and HAS_PYARROW, reason="TODO(infer_string) fastparquet"
183-
)
184179
def test_to_parquet_new_file(cleared_fs, df1):
185180
"""Regression test for writing to a not-yet-existent GCS Parquet file."""
186181
pytest.importorskip("fastparquet")

0 commit comments

Comments
 (0)