@@ -988,6 +988,9 @@ def _get_expected_exception(
988
988
or pa .types .is_integer (pa_dtype )
989
989
or pa .types .is_decimal (pa_dtype )
990
990
):
991
+ # TODO: in many of these cases, e.g. non-duration temporal,
992
+ # these will *never* be allowed. Would it make more sense to
993
+ # re-raise as TypeError, more consistent with non-pyarrow cases?
991
994
exc = pa .ArrowNotImplementedError
992
995
else :
993
996
exc = None
@@ -1123,32 +1126,7 @@ def test_arith_series_with_array(self, data, all_arithmetic_operators, request):
1123
1126
def test_add_series_with_extension_array (self , data , request ):
1124
1127
pa_dtype = data .dtype .pyarrow_dtype
1125
1128
1126
- if pa .types .is_temporal (pa_dtype ) and not pa .types .is_duration (pa_dtype ):
1127
- # i.e. timestamp, date, time, but not timedelta; these *should*
1128
- # raise when trying to add
1129
- ser = pd .Series (data )
1130
- if pa_version_under7p0 :
1131
- msg = "Function add_checked has no kernel matching input types"
1132
- else :
1133
- msg = "Function 'add_checked' has no kernel matching input types"
1134
- with pytest .raises (NotImplementedError , match = msg ):
1135
- # TODO: this is a pa.lib.ArrowNotImplementedError, might
1136
- # be better to reraise a TypeError; more consistent with
1137
- # non-pyarrow cases
1138
- ser + data
1139
-
1140
- return
1141
-
1142
- if (pa_version_under8p0 and pa .types .is_duration (pa_dtype )) or (
1143
- pa .types .is_boolean (pa_dtype )
1144
- ):
1145
- request .node .add_marker (
1146
- pytest .mark .xfail (
1147
- raises = NotImplementedError ,
1148
- reason = f"add_checked not implemented for { pa_dtype } " ,
1149
- )
1150
- )
1151
- elif pa_dtype .equals ("int8" ):
1129
+ if pa_dtype .equals ("int8" ):
1152
1130
request .node .add_marker (
1153
1131
pytest .mark .xfail (
1154
1132
raises = pa .ArrowInvalid ,
0 commit comments