diff --git a/python/pyarrow/tests/test_convert_pandas.py b/python/pyarrow/tests/test_convert_pandas.py index 62ea5b8ffd3..e3cc8369097 100644 --- a/python/pyarrow/tests/test_convert_pandas.py +++ b/python/pyarrow/tests/test_convert_pandas.py @@ -859,7 +859,7 @@ def test_pandas_datetime_to_date64_failures(self, mask): ]) expected_msg = 'Timestamp value had non-zero intraday milliseconds' - with pytest.raises(pa.ArrowInvalid, msg=expected_msg): + with pytest.raises(pa.ArrowInvalid, match=expected_msg): pa.Array.from_pandas(s, type=pa.date64(), mask=mask) def test_date_infer(self):