You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (JIRA)" <ji...@apache.org> on 2018/04/25 11:52:00 UTC
[jira] [Resolved] (ARROW-2508) [Python] pytest API changes make
tests fail
[ https://issues.apache.org/jira/browse/ARROW-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoine Pitrou resolved ARROW-2508.
-----------------------------------
Resolution: Fixed
Fix Version/s: 0.10.0
Issue resolved by pull request 1944
[https://github.com/apache/arrow/pull/1944]
> [Python] pytest API changes make tests fail
> -------------------------------------------
>
> Key: ARROW-2508
> URL: https://issues.apache.org/jira/browse/ARROW-2508
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Python
> Reporter: Philipp Moritz
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.10.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Seems like there is a new pytest on pypy, it produces the following failures:
> ```
> =================================== FAILURES ===================================
> __ TestConvertDateTimeLikeTypes.test_pandas_datetime_to_date64_failures[None] __
>
> self = <pyarrow.tests.test_convert_pandas.TestConvertDateTimeLikeTypes object at 0x112dd6a90>
> mask = None
>
> @pytest.mark.parametrize('mask', [
> None,
> np.ones(3),
> np.array([True, False, False])
> ])
> def test_pandas_datetime_to_date64_failures(self, mask):
> s = pd.to_datetime([
> '2018-05-10T10:24:01',
> '2018-05-11T10:24:01',
> '2018-05-12T10:24:01',
> ])
>
> expected_msg = 'Timestamp value had non-zero intraday milliseconds'
> > with pytest.raises(pa.ArrowInvalid, msg=expected_msg):
> E TypeError: Unexpected keyword arguments passed to pytest.raises: msg
>
> pyarrow-test-3.6/lib/python3.6/site-packages/pyarrow/tests/test_convert_pandas.py:862: TypeError
> _ TestConvertDateTimeLikeTypes.test_pandas_datetime_to_date64_failures[mask1] __
>
> self = <pyarrow.tests.test_convert_pandas.TestConvertDateTimeLikeTypes object at 0x113213160>
> mask = array([ 1., 1., 1.])
>
> @pytest.mark.parametrize('mask', [
> None,
> np.ones(3),
> np.array([True, False, False])
> ])
> def test_pandas_datetime_to_date64_failures(self, mask):
> s = pd.to_datetime([
> '2018-05-10T10:24:01',
> '2018-05-11T10:24:01',
> '2018-05-12T10:24:01',
> ])
>
> expected_msg = 'Timestamp value had non-zero intraday milliseconds'
> > with pytest.raises(pa.ArrowInvalid, msg=expected_msg):
> E TypeError: Unexpected keyword arguments passed to pytest.raises: msg
>
> pyarrow-test-3.6/lib/python3.6/site-packages/pyarrow/tests/test_convert_pandas.py:862: TypeError
> _ TestConvertDateTimeLikeTypes.test_pandas_datetime_to_date64_failures[mask2] __
>
> self = <pyarrow.tests.test_convert_pandas.TestConvertDateTimeLikeTypes object at 0x112ed4c88>
> mask = array([ True, False, False], dtype=bool)
>
> @pytest.mark.parametrize('mask', [
> None,
> np.ones(3),
> np.array([True, False, False])
> ])
> def test_pandas_datetime_to_date64_failures(self, mask):
> s = pd.to_datetime([
> '2018-05-10T10:24:01',
> '2018-05-11T10:24:01',
> '2018-05-12T10:24:01',
> ])
>
> expected_msg = 'Timestamp value had non-zero intraday milliseconds'
> > with pytest.raises(pa.ArrowInvalid, msg=expected_msg):
> E TypeError: Unexpected keyword arguments passed to pytest.raises: msg
>
> pyarrow-test-3.6/lib/python3.6/site-packages/pyarrow/tests/test_convert_pandas.py:862: TypeError
> =========================== short test summary info ============================
> ```
> I think we can just change msg to message and it should work again.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)