Skip to content

Commit 915b38f

Browse files
committed
BUG: Fix Series.str.contains with compiled regex on Arrow string dtype (#61942)
1 parent 0e620ca commit 915b38f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

pandas/tests/strings/test_find_replace.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ def test_contains_nan(any_string_dtype):
283283

284284
def test_str_contains_compiled_regex_arrow_dtype(any_string_dtype):
285285
# GH#61942
286-
if any_string_dtype == "string[pyarrow]":
287-
pytest.importorskip("pyarrow")
288286
ser = Series(["foo", "bar", "baz"], dtype=any_string_dtype)
289287
pat = re.compile("ba.")
290288
result = ser.str.contains(pat)
@@ -295,7 +293,6 @@ def test_str_contains_compiled_regex_arrow_dtype(any_string_dtype):
295293
"str": bool,
296294
}.get(any_string_dtype, object)
297295
expected = Series([False, True, True], dtype=expected_dtype)
298-
assert str(result.dtype) == str(expected.dtype)
299296
tm.assert_series_equal(result, expected)
300297

301298

0 commit comments

Comments
 (0)