From ba66b5bcd4ec7eff38ee5d9269507629a9002f5e Mon Sep 17 00:00:00 2001 From: Dom Gomar Date: Sun, 26 Apr 2020 16:44:01 +0100 Subject: [PATCH] TST: Added message to bare pytest.raises in test_join_multi_levels (#30999) --- pandas/tests/reshape/merge/test_multi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandas/tests/reshape/merge/test_multi.py b/pandas/tests/reshape/merge/test_multi.py index 1f78c1900d237..61fdafa0c6db2 100644 --- a/pandas/tests/reshape/merge/test_multi.py +++ b/pandas/tests/reshape/merge/test_multi.py @@ -582,13 +582,15 @@ def test_join_multi_levels(self): # invalid cases household.index.name = "foo" - with pytest.raises(ValueError): + with pytest.raises( + ValueError, match="cannot join with no overlapping index names" + ): household.join(portfolio, how="inner") portfolio2 = portfolio.copy() portfolio2.index.set_names(["household_id", "foo"]) - with pytest.raises(ValueError): + with pytest.raises(ValueError, match="columns overlap but no suffix specified"): portfolio2.join(portfolio, how="inner") def test_join_multi_levels2(self):