File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1942,6 +1942,18 @@ def test_str_find_negative_start():
1942
1942
tm .assert_series_equal (result , expected )
1943
1943
1944
1944
1945
+ def test_str_find_no_end ():
1946
+ ser = pd .Series (["abc" , None ], dtype = ArrowDtype (pa .string ()))
1947
+ if pa_version_under13p0 :
1948
+ # https://github.com/apache/arrow/issues/36311
1949
+ with pytest .raises (pa .lib .ArrowInvalid , match = "Negative buffer resize" ):
1950
+ ser .str .find ("ab" , start = 1 )
1951
+ else :
1952
+ result = ser .str .find ("ab" , start = 1 )
1953
+ expected = pd .Series ([- 1 , None ], dtype = "int64[pyarrow]" )
1954
+ tm .assert_series_equal (result , expected )
1955
+
1956
+
1945
1957
def test_str_find_negative_start_negative_end ():
1946
1958
# GH 56791
1947
1959
ser = pd .Series (["abcdefg" , None ], dtype = ArrowDtype (pa .string ()))
You can’t perform that action at this time.
0 commit comments