@@ -55,15 +55,15 @@ def test_array_scalar_like_equivalence(data, all_arithmetic_operators):
55
55
scalar_array = pd .array ([scalar ] * len (data ), dtype = data .dtype )
56
56
57
57
# TODO also add len-1 array (np.array([scalar], dtype=data.dtype.numpy_dtype))
58
- for scalar in [scalar , data .dtype .type (scalar )]:
58
+ for val in [scalar , data .dtype .type (scalar )]:
59
59
if is_bool_not_implemented (data , all_arithmetic_operators ):
60
60
msg = "operator '.*' not implemented for bool dtypes"
61
61
with pytest .raises (NotImplementedError , match = msg ):
62
- op (data , scalar )
62
+ op (data , val )
63
63
with pytest .raises (NotImplementedError , match = msg ):
64
64
op (data , scalar_array )
65
65
else :
66
- result = op (data , scalar )
66
+ result = op (data , val )
67
67
expected = op (data , scalar_array )
68
68
tm .assert_extension_array_equal (result , expected )
69
69
@@ -214,13 +214,13 @@ def test_error_len_mismatch(data, all_arithmetic_operators):
214
214
msg = "operator '.*' not implemented for bool dtypes"
215
215
err = NotImplementedError
216
216
217
- for other in [other , np .array (other )]:
217
+ for val in [other , np .array (other )]:
218
218
with pytest .raises (err , match = msg ):
219
- op (data , other )
219
+ op (data , val )
220
220
221
221
s = pd .Series (data )
222
222
with pytest .raises (err , match = msg ):
223
- op (s , other )
223
+ op (s , val )
224
224
225
225
226
226
@pytest .mark .parametrize ("op" , ["__neg__" , "__abs__" , "__invert__" ])
0 commit comments