@@ -1479,7 +1479,7 @@ def test_combine_le(self, data_repeated):
1479
1479
1480
1480
def test_combine_add (self , data_repeated , request ):
1481
1481
pa_dtype = next (data_repeated (1 )).dtype .pyarrow_dtype
1482
- if pa .types .is_temporal (pa_dtype ) and pa_dtype != ' duration[ns]' :
1482
+ if pa .types .is_temporal (pa_dtype ) and pa_dtype != " duration[ns]" :
1483
1483
request .node .add_marker (
1484
1484
pytest .mark .xfail (
1485
1485
raises = TypeError ,
@@ -1552,7 +1552,7 @@ def test_arith_series_with_scalar(
1552
1552
all_arithmetic_operators in ("__add__" , "__radd__" )
1553
1553
and pa .types .is_duration (pa_dtype )
1554
1554
or all_arithmetic_operators in ("__sub__" , "__rsub__" )
1555
- and pa .types .is_temporal (pa_dtype ) and pa_dtype != 'duration[ns]'
1555
+ and pa .types .is_temporal (pa_dtype )
1556
1556
)
1557
1557
if (
1558
1558
all_arithmetic_operators
@@ -1589,7 +1589,7 @@ def test_arith_series_with_scalar(
1589
1589
elif arrow_temporal_supported :
1590
1590
request .node .add_marker (
1591
1591
pytest .mark .xfail (
1592
- raises = TypeError ,
1592
+ raises = TypeError if pa_dtype != "duration[ns]" else AssertionError ,
1593
1593
reason = (
1594
1594
f"{ all_arithmetic_operators } not supported between"
1595
1595
f"pd.NA and { pa_dtype } Python scalar"
@@ -1655,7 +1655,7 @@ def test_arith_frame_with_scalar(
1655
1655
elif arrow_temporal_supported :
1656
1656
request .node .add_marker (
1657
1657
pytest .mark .xfail (
1658
- raises = TypeError ,
1658
+ raises = TypeError if pa_dtype != "duration[ns]" else AssertionError ,
1659
1659
reason = (
1660
1660
f"{ all_arithmetic_operators } not supported between"
1661
1661
f"pd.NA and { pa_dtype } Python scalar"
@@ -1739,7 +1739,7 @@ def test_arith_series_with_array(
1739
1739
elif arrow_temporal_supported :
1740
1740
request .node .add_marker (
1741
1741
pytest .mark .xfail (
1742
- raises = TypeError ,
1742
+ raises = TypeError if pa_dtype != "duration[ns]" else AssertionError ,
1743
1743
reason = (
1744
1744
f"{ all_arithmetic_operators } not supported between"
1745
1745
f"pd.NA and { pa_dtype } Python scalar"
0 commit comments