Skip to content

Commit 45a9bf6

Browse files
jorisvandenbosscheAnkurDedania
authored andcommitted
TST: fix test str_replace error messge (pandas-dev#15456)
1 parent 5b8ded1 commit 45a9bf6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/test_strings.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -511,13 +511,13 @@ def test_replace_compiled_regex(self):
511511
values = Series(['fooBAD__barBAD__bad', NA])
512512
pat = re.compile(r'BAD[_]*')
513513

514-
with tm.assertRaisesRegexp(ValueError, "case and flags must be"):
514+
with tm.assertRaisesRegexp(ValueError, "case and flags cannot be"):
515515
result = values.str.replace(pat, '', flags=re.IGNORECASE)
516516

517-
with tm.assertRaisesRegexp(ValueError, "case and flags must be"):
517+
with tm.assertRaisesRegexp(ValueError, "case and flags cannot be"):
518518
result = values.str.replace(pat, '', case=False)
519519

520-
with tm.assertRaisesRegexp(ValueError, "case and flags must be"):
520+
with tm.assertRaisesRegexp(ValueError, "case and flags cannot be"):
521521
result = values.str.replace(pat, '', case=True)
522522

523523
# test with callable

0 commit comments

Comments
 (0)