Skip to content

Commit 7c12f15

Browse files
rhshadrachWillAyd
authored andcommitted
xfail test when there is no pyarrow
1 parent de728ad commit 7c12f15

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

pandas/tests/apply/test_str.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
import numpy as np
55
import pytest
66

7-
from pandas.compat import WASM
7+
from pandas.compat import (
8+
HAS_PYARROW,
9+
WASM,
10+
)
811

912
from pandas.core.dtypes.common import is_number
1013

@@ -159,10 +162,17 @@ def test_agg_cython_table_series(series, func, expected):
159162
),
160163
),
161164
)
162-
def test_agg_cython_table_transform_series(series, func, expected):
165+
def test_agg_cython_table_transform_series(request, series, func, expected):
163166
# GH21224
164167
# test transforming functions in
165168
# pandas.core.base.SelectionMixin._cython_table (cumprod, cumsum)
169+
if series.dtype == "string" and func == "cumsum" and not HAS_PYARROW:
170+
request.applymarker(
171+
pytest.mark.xfail(
172+
raises=NotImplementedError,
173+
reason="TODO(infer_string) cumsum not yet implemented for string",
174+
)
175+
)
166176
warn = None if isinstance(func, str) else FutureWarning
167177
with tm.assert_produces_warning(warn, match="is currently using Series.*"):
168178
result = series.agg(func)

0 commit comments

Comments
 (0)