Skip to content

Commit 7fa21eb

Browse files
author
Rohan Jain
committed
fix
1 parent 06105ce commit 7fa21eb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pandas/tests/extension/test_arrow.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -1979,8 +1979,6 @@ def test_str_find_large_start():
19791979
@pytest.mark.xfail(
19801980
pa_version_under13p0, reason="https://github.com/apache/arrow/issues/36311"
19811981
)
1982-
@pytest.mark.parametrize("start", list(range(-15, 15)) + [None])
1983-
@pytest.mark.parametrize("end", list(range(-15, 15)) + [None])
19841982
@pytest.mark.parametrize(
19851983
"sub",
19861984
["abcaadef"[x:y] for x, y in combinations(range(len("abcaadef") + 1), r=2)]
@@ -1990,15 +1988,18 @@ def test_str_find_large_start():
19901988
"abce",
19911989
],
19921990
)
1993-
def test_str_find_e2e(start, end, sub):
1991+
def test_str_find_e2e(sub):
19941992
s = pd.Series(
19951993
["abcaadef", "abc", "abcdeddefgj8292", "ab", "a", ""],
19961994
dtype=ArrowDtype(pa.string()),
19971995
)
19981996
object_series = s.astype(pd.StringDtype())
1999-
result = s.str.find(sub, start, end)
2000-
expected = object_series.str.find(sub, start, end).astype(result.dtype)
2001-
tm.assert_series_equal(result, expected)
1997+
offsets = list(range(-15, 15)) + [None]
1998+
for start in offsets:
1999+
for end in offsets:
2000+
result = s.str.find(sub, start, end)
2001+
expected = object_series.str.find(sub, start, end).astype(result.dtype)
2002+
tm.assert_series_equal(result, expected)
20022003

20032004

20042005
def test_str_find_negative_start_negative_end_no_match():

0 commit comments

Comments
 (0)