Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update test error messages for merge type errors
  • Loading branch information
KevsterAmp committed Aug 21, 2024
commit 3e5b2394c5f9c302c61ea35a38ff27356d62225b
5 changes: 1 addition & 4 deletions pandas/tests/frame/methods/test_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,7 @@ def test_join_index(float_frame):
tm.assert_index_equal(joined.index, float_frame.index.sort_values())
tm.assert_index_equal(joined.columns, expected_columns)

join_msg = (
"'foo' is not a valid Merge type "
"('left', 'right', 'inner', 'outer', 'cross', 'asof')"
)
join_msg = "'foo' is not a valid Merge type: left, right, inner, outer, cross, asof"
with pytest.raises(ValueError, match=re.escape(join_msg)):
f.join(f2, how="foo")

Expand Down
5 changes: 1 addition & 4 deletions pandas/tests/reshape/merge/test_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1464,10 +1464,7 @@ def test_merge_how_validation(self):
data2 = DataFrame(
np.arange(20).reshape((5, 4)) + 1, columns=["a", "b", "x", "y"]
)
msg = (
"'full' is not a valid Merge type "
"('left', 'right', 'inner', 'outer', 'cross', 'asof')"
)
msg = "'full' is not a valid Merge type: left, right, inner, outer, cross, asof"
with pytest.raises(ValueError, match=re.escape(msg)):
data1.merge(data2, how="full")

Expand Down