From 6d6cc68501044f744565f6601e871979e853d949 Mon Sep 17 00:00:00 2001 From: Philipp Moritz Date: Wed, 25 Apr 2018 00:13:00 -0700 Subject: [PATCH 1/2] fix pytest.raises msg to message --- python/pyarrow/tests/test_convert_pandas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyarrow/tests/test_convert_pandas.py b/python/pyarrow/tests/test_convert_pandas.py index 62ea5b8ffd3..6ca214fe3d2 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, message=expected_msg): pa.Array.from_pandas(s, type=pa.date64(), mask=mask) def test_date_infer(self): From 00b2cd4c645fe54e8463926373a706a61f2b74be Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 25 Apr 2018 13:01:29 +0200 Subject: [PATCH 2/2] Use `match` argument as intended by the test --- python/pyarrow/tests/test_convert_pandas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyarrow/tests/test_convert_pandas.py b/python/pyarrow/tests/test_convert_pandas.py index 6ca214fe3d2..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, message=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):