@@ -166,23 +166,14 @@ def test_fillna_no_op_returns_copy(self, data):
166
166
def _get_expected_exception (
167
167
self , op_name : str , obj , other
168
168
) -> type [Exception ] | None :
169
- if op_name in ["__divmod__" , "__rdivmod__" ]:
170
- if (
171
- isinstance (obj , pd .Series )
172
- and cast (StringDtype , tm .get_dtype (obj )).storage == "pyarrow"
173
- ):
174
- # TODO: re-raise as TypeError?
175
- return NotImplementedError
176
- elif (
177
- isinstance (other , pd .Series )
178
- and cast (StringDtype , tm .get_dtype (other )).storage == "pyarrow"
179
- ):
180
- # TODO: re-raise as TypeError?
181
- return NotImplementedError
182
- return TypeError
183
- elif op_name in ["__mod__" , "__rmod__" , "__pow__" , "__rpow__" ]:
184
- if cast (StringDtype , tm .get_dtype (obj )).storage == "pyarrow" :
185
- return NotImplementedError
169
+ if op_name in [
170
+ "__mod__" ,
171
+ "__rmod__" ,
172
+ "__divmod__" ,
173
+ "__rdivmod__" ,
174
+ "__pow__" ,
175
+ "__rpow__" ,
176
+ ]:
186
177
return TypeError
187
178
elif op_name in ["__mul__" , "__rmul__" ]:
188
179
# Can only multiply strings by integers
@@ -195,11 +186,6 @@ def _get_expected_exception(
195
186
"__sub__" ,
196
187
"__rsub__" ,
197
188
]:
198
- if cast (StringDtype , tm .get_dtype (obj )).storage == "pyarrow" :
199
- import pyarrow as pa
200
-
201
- # TODO: better to re-raise as TypeError?
202
- return pa .ArrowNotImplementedError
203
189
return TypeError
204
190
205
191
return None
0 commit comments