Skip to content

Commit 8820846

Browse files
committed
xfail on min pyarrow
1 parent 5fded80 commit 8820846

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

pandas/tests/extension/test_arrow.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,10 @@ def test_str_join_string_type():
20362036
[None, 2, None, ["ab", None]],
20372037
[None, 2, 1, ["ab", None]],
20382038
[1, 3, 1, ["bc", None]],
2039-
[None, None, -1, ["dcba", None]],
2039+
pytest.param(
2040+
[None, None, -1, ["dcba", None]],
2041+
marks=pytest.mark.xfail(pa_version_under11p0, reason="Empty result"),
2042+
),
20402043
],
20412044
)
20422045
def test_str_slice(start, stop, step, exp):

pandas/tests/strings/test_string_array.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import pytest
33

44
from pandas._libs import lib
5-
from pandas.compat import pa_version_under11p0
65

76
from pandas import (
87
NA,
@@ -14,7 +13,7 @@
1413

1514

1615
@pytest.mark.filterwarnings("ignore:Falling back")
17-
def test_string_array(nullable_string_dtype, any_string_method, request):
16+
def test_string_array(nullable_string_dtype, any_string_method):
1817
method_name, args, kwargs = any_string_method
1918

2019
data = ["a", "bb", np.nan, "ccc"]
@@ -26,14 +25,6 @@ def test_string_array(nullable_string_dtype, any_string_method, request):
2625
getattr(b.str, method_name)(*args, **kwargs)
2726
return
2827

29-
if (
30-
method_name == "slice"
31-
and nullable_string_dtype == "string[pyarrow]"
32-
and pa_version_under11p0
33-
):
34-
mark = pytest.mark.xfail(reason="Raises with Negative buffer resize: -16")
35-
request.applymarker(mark)
36-
3728
expected = getattr(a.str, method_name)(*args, **kwargs)
3829
result = getattr(b.str, method_name)(*args, **kwargs)
3930

pandas/tests/strings/test_strings.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import numpy as np
77
import pytest
88

9+
from pandas.compat import pa_version_under11p0
10+
911
from pandas import (
1012
DataFrame,
1113
Index,
@@ -393,7 +395,10 @@ def test_pipe_failures(any_string_dtype):
393395
[
394396
(2, 5, None, ["foo", "bar", np.nan, "baz"]),
395397
(0, 3, -1, ["", "", np.nan, ""]),
396-
(None, None, -1, ["owtoofaa", "owtrabaa", np.nan, "xuqzabaa"]),
398+
pytest.param(
399+
(None, None, -1, ["owtoofaa", "owtrabaa", np.nan, "xuqzabaa"]),
400+
marks=pytest.mark.xfail(pa_version_under11p0, reason="Empty result"),
401+
),
397402
(3, 10, 2, ["oto", "ato", np.nan, "aqx"]),
398403
(3, 0, -1, ["ofa", "aba", np.nan, "aba"]),
399404
],

0 commit comments

Comments
 (0)