Skip to content

Commit da5f363

Browse files
committed
Fix test_str_contains_compiled_regex_arrow_dtype to properly handle dtype expectations
1 parent ff10123 commit da5f363

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

pandas/tests/strings/test_find_replace.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -287,18 +287,7 @@ def test_str_contains_compiled_regex_arrow_dtype(any_string_dtype):
287287
pat = re.compile("ba.")
288288
result = ser.str.contains(pat)
289289

290-
# Get the string representation of the dtype for comparison
291-
dtype_str = str(any_string_dtype)
292-
293-
if "pyarrow" in dtype_str:
294-
expected_dtype = "bool[pyarrow]"
295-
elif "StringDtype" in dtype_str:
296-
expected_dtype = "boolean"
297-
else:
298-
# For object and regular string dtypes
299-
expected_dtype = bool
300-
301-
expected = Series([False, True, True], dtype=expected_dtype)
290+
expected = Series([False, True, True], dtype=bool)
302291
tm.assert_series_equal(result, expected)
303292

304293

0 commit comments

Comments
 (0)