diff --git a/python/pyarrow/tests/test_convert_pandas.py b/python/pyarrow/tests/test_convert_pandas.py index 4a57e4ba1d4..2394d638d07 100644 --- a/python/pyarrow/tests/test_convert_pandas.py +++ b/python/pyarrow/tests/test_convert_pandas.py @@ -18,6 +18,7 @@ from collections import OrderedDict +import pytest import datetime import unittest import decimal @@ -412,6 +413,18 @@ def test_dates_from_integers(self): assert a1[0].as_py() == expected assert a2[0].as_py() == expected + @pytest.mark.xfail(reason="not supported ATM", + raises=NotImplementedError) + def test_timedelta(self): + # TODO(jreback): Pandas only support ns resolution + # Arrow supports ??? for resolution + df = pd.DataFrame({ + 'timedelta': np.arange(start=0, stop=3*86400000, + step=86400000, + dtype='timedelta64[ms]') + }) + pa.Table.from_pandas(df) + def test_column_of_arrays(self): df, schema = dataframe_with_arrays() self._check_pandas_roundtrip(df, schema=schema, expected_schema=schema) diff --git a/python/pyarrow/tests/test_feather.py b/python/pyarrow/tests/test_feather.py index 6f8040fd483..ef73a8feeb6 100644 --- a/python/pyarrow/tests/test_feather.py +++ b/python/pyarrow/tests/test_feather.py @@ -14,6 +14,7 @@ import os import unittest +import pytest from numpy.testing import assert_array_equal import numpy as np @@ -320,6 +321,15 @@ def test_timestamp_with_nulls(self): self._check_pandas_roundtrip(df, null_counts=[1, 1]) + @pytest.mark.xfail(reason="not supported ATM", + raises=NotImplementedError) + def test_timedelta_with_nulls(self): + df = pd.DataFrame({'test': [pd.Timedelta('1 day'), + None, + pd.Timedelta('3 day')]}) + + self._check_pandas_roundtrip(df, null_counts=[1, 1]) + def test_out_of_float64_timestamp_with_nulls(self): df = pd.DataFrame( {'test': pd.DatetimeIndex([1451606400000000001,