Skip to content

Commit 4718def

Browse files
Dom-L-Grhshadrach
authored andcommitted
TST: Added message to bare pytest.raises in test_join_multi_levels (pandas-dev#30999) (pandas-dev#33806)
1 parent b8f1e2d commit 4718def

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/tests/reshape/merge/test_multi.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,13 +582,15 @@ def test_join_multi_levels(self):
582582
# invalid cases
583583
household.index.name = "foo"
584584

585-
with pytest.raises(ValueError):
585+
with pytest.raises(
586+
ValueError, match="cannot join with no overlapping index names"
587+
):
586588
household.join(portfolio, how="inner")
587589

588590
portfolio2 = portfolio.copy()
589591
portfolio2.index.set_names(["household_id", "foo"])
590592

591-
with pytest.raises(ValueError):
593+
with pytest.raises(ValueError, match="columns overlap but no suffix specified"):
592594
portfolio2.join(portfolio, how="inner")
593595

594596
def test_join_multi_levels2(self):

0 commit comments

Comments
 (0)