@@ -1979,8 +1979,6 @@ def test_str_find_large_start():
1979
1979
@pytest .mark .xfail (
1980
1980
pa_version_under13p0 , reason = "https://github.com/apache/arrow/issues/36311"
1981
1981
)
1982
- @pytest .mark .parametrize ("start" , list (range (- 15 , 15 )) + [None ])
1983
- @pytest .mark .parametrize ("end" , list (range (- 15 , 15 )) + [None ])
1984
1982
@pytest .mark .parametrize (
1985
1983
"sub" ,
1986
1984
["abcaadef" [x :y ] for x , y in combinations (range (len ("abcaadef" ) + 1 ), r = 2 )]
@@ -1990,15 +1988,18 @@ def test_str_find_large_start():
1990
1988
"abce" ,
1991
1989
],
1992
1990
)
1993
- def test_str_find_e2e (start , end , sub ):
1991
+ def test_str_find_e2e (sub ):
1994
1992
s = pd .Series (
1995
1993
["abcaadef" , "abc" , "abcdeddefgj8292" , "ab" , "a" , "" ],
1996
1994
dtype = ArrowDtype (pa .string ()),
1997
1995
)
1998
1996
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 )
2002
2003
2003
2004
2004
2005
def test_str_find_negative_start_negative_end_no_match ():
0 commit comments