Skip to content

Commit f2c6723

Browse files
committed
BUG: Series.astype is unable to handle pd.nan.
1 parent 9ff4708 commit f2c6723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tests/extension/test_arrow.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ def test_combine_le(self, data_repeated):
14791479

14801480
def test_combine_add(self, data_repeated, request):
14811481
pa_dtype = next(data_repeated(1)).dtype.pyarrow_dtype
1482-
if pa.types.is_temporal(pa_dtype):
1482+
if pa.types.is_temporal(pa_dtype) and pa_dtype != 'duration[ns]':
14831483
request.node.add_marker(
14841484
pytest.mark.xfail(
14851485
raises=TypeError,
@@ -1552,7 +1552,7 @@ def test_arith_series_with_scalar(
15521552
all_arithmetic_operators in ("__add__", "__radd__")
15531553
and pa.types.is_duration(pa_dtype)
15541554
or all_arithmetic_operators in ("__sub__", "__rsub__")
1555-
and pa.types.is_temporal(pa_dtype)
1555+
and pa.types.is_temporal(pa_dtype) and pa_dtype != 'duration[ns]'
15561556
)
15571557
if (
15581558
all_arithmetic_operators

0 commit comments

Comments
 (0)