diff --git a/pandas/tests/util/test_move.py b/pandas/tests/util/test_move.py index c12e2f7a167ad..ef98f2032e6ca 100644 --- a/pandas/tests/util/test_move.py +++ b/pandas/tests/util/test_move.py @@ -23,7 +23,7 @@ def test_more_than_one_ref(): b = b"testing" - with pytest.raises(BadMove) as e: + with pytest.raises(BadMove, match="testing") as e: def handle_success(type_, value, tb): assert value.args[0] is b return type(e).handle_success(e, type_, value, tb) # super