Skip to content

Commit 7f8b512

Browse files
committed
fix error message on test_join_index to the updated change
1 parent 7688ede commit 7f8b512

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pandas/tests/frame/methods/test_join.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from datetime import datetime
2+
import re
23
import zoneinfo
34

45
import numpy as np
@@ -276,7 +277,11 @@ def test_join_index(float_frame):
276277
tm.assert_index_equal(joined.index, float_frame.index.sort_values())
277278
tm.assert_index_equal(joined.columns, expected_columns)
278279

279-
with pytest.raises(ValueError, match="join method"):
280+
join_msg = (
281+
"'foo' is not a valid Merge type "
282+
"('left', 'right', 'inner', 'outer', 'cross', 'asof')"
283+
)
284+
with pytest.raises(ValueError, match=re.escape(join_msg)):
280285
f.join(f2, how="foo")
281286

282287
# corner case - overlapping columns

0 commit comments

Comments
 (0)