diff --git a/pandas/tests/scalar/period/test_asfreq.py b/pandas/tests/scalar/period/test_asfreq.py index 597282e10052e..0c491786370a2 100644 --- a/pandas/tests/scalar/period/test_asfreq.py +++ b/pandas/tests/scalar/period/test_asfreq.py @@ -825,6 +825,7 @@ def test_asfreq_MS(self): with pytest.raises(ValueError, match=msg): initial.asfreq(freq="MS", how="S") + msg = "MonthBegin is not supported as period frequency" with pytest.raises(ValueError, match=msg): Period("2013-01", "MS")