@@ -78,7 +78,7 @@ def generate_params(
78
78
# out for now.
79
79
# @example(shape=(0,))
80
80
@given (two_shapes = hh .two_mutually_broadcastable_shapes , data = st .data ())
81
- def test_elementwise_two_args_bool_type_promotion (func , two_shapes , dtypes , data ):
81
+ def test_elementwise_two_args_return_bool (func , two_shapes , dtypes , data ):
82
82
assert nargs (func ) == 2
83
83
func = getattr (xp , func )
84
84
@@ -110,7 +110,7 @@ def test_elementwise_two_args_bool_type_promotion(func, two_shapes, dtypes, data
110
110
# out for now.
111
111
# @example(shape=(0,))
112
112
@given (two_shapes = hh .two_mutually_broadcastable_shapes , data = st .data ())
113
- def test_elementwise_two_args_promoted_type_promotion (func ,
113
+ def test_elementwise_two_args_return_promoted (func ,
114
114
two_shapes , dtypes ,
115
115
data ):
116
116
assert nargs (func ) == 2
@@ -143,7 +143,7 @@ def test_elementwise_two_args_promoted_type_promotion(func,
143
143
# out for now.
144
144
# @example(shape=(0,))
145
145
@given (shape = hh .shapes , data = st .data ())
146
- def test_elementwise_one_arg_bool (func , shape , dtype , data ):
146
+ def test_elementwise_one_arg_return_bool (func , shape , dtype , data ):
147
147
assert nargs (func ) == 1
148
148
func = getattr (xp , func )
149
149
@@ -166,7 +166,7 @@ def test_elementwise_one_arg_bool(func, shape, dtype, data):
166
166
# out for now.
167
167
# @example(shape=(0,))
168
168
@given (shape = hh .shapes , data = st .data ())
169
- def test_elementwise_one_arg_type_promotion (func , shape ,
169
+ def test_elementwise_one_arg_return_promoted (func , shape ,
170
170
dtype , data ):
171
171
assert nargs (func ) == 1
172
172
func = getattr (xp , func )
@@ -194,7 +194,7 @@ def test_elementwise_one_arg_type_promotion(func, shape,
194
194
# out for now.
195
195
# @example(shape=(0,))
196
196
@given (shape = hh .shapes , data = st .data ())
197
- def test_operator_one_arg_type_promotion (unary_op_name , unary_op , shape , dtype , data ):
197
+ def test_operator_one_arg_return_promoted (unary_op_name , unary_op , shape , dtype , data ):
198
198
fillvalue = data .draw (hh .scalars (st .just (dtype )))
199
199
200
200
if isinstance (dtype , xp ._UndefinedStub ):
@@ -218,7 +218,7 @@ def test_operator_one_arg_type_promotion(unary_op_name, unary_op, shape, dtype,
218
218
generate_params ('operator' , in_nargs = 2 , out_category = 'bool' )
219
219
)
220
220
@given (two_shapes = hh .two_mutually_broadcastable_shapes , data = st .data ())
221
- def test_operator_two_args_bool_promotion (binary_op_name , binary_op , dtypes , two_shapes , data ):
221
+ def test_operator_two_args_return_bool (binary_op_name , binary_op , dtypes , two_shapes , data ):
222
222
dtype1 , dtype2 = dtypes
223
223
fillvalue1 = data .draw (hh .scalars (st .just (dtype1 )))
224
224
fillvalue2 = data .draw (hh .scalars (st .just (dtype2 )))
@@ -249,7 +249,7 @@ def test_operator_two_args_bool_promotion(binary_op_name, binary_op, dtypes, two
249
249
250
250
@pytest .mark .parametrize ('binary_op_name, binary_op, dtypes' , generate_params ('operator' , in_nargs = 2 , out_category = 'promoted' ))
251
251
@given (two_shapes = hh .two_mutually_broadcastable_shapes , data = st .data ())
252
- def test_operator_two_args_promoted_promotion (binary_op_name , binary_op , dtypes , two_shapes , data ):
252
+ def test_operator_two_args_return_promoted (binary_op_name , binary_op , dtypes , two_shapes , data ):
253
253
(dtype1 , dtype2 ), res_dtype = dtypes
254
254
fillvalue1 = data .draw (hh .scalars (st .just (dtype1 )))
255
255
if binary_op_name in ['>>' , '<<' ]:
@@ -279,7 +279,7 @@ def test_operator_two_args_promoted_promotion(binary_op_name, binary_op, dtypes,
279
279
280
280
@pytest .mark .parametrize ('binary_op_name, binary_op, dtypes' , generate_params ('operator' , in_nargs = 2 , out_category = 'promoted' ))
281
281
@given (two_shapes = hh .two_broadcastable_shapes (), data = st .data ())
282
- def test_operator_inplace_two_args_promoted_promotion (binary_op_name , binary_op , dtypes , two_shapes ,
282
+ def test_operator_inplace_two_args_return_promoted (binary_op_name , binary_op , dtypes , two_shapes ,
283
283
data ):
284
284
(dtype1 , dtype2 ), res_dtype = dtypes
285
285
fillvalue1 = data .draw (hh .scalars (st .just (dtype1 )))
@@ -315,7 +315,7 @@ def test_operator_inplace_two_args_promoted_promotion(binary_op_name, binary_op,
315
315
@pytest .mark .parametrize ('binary_op_name,dtype,scalar_type' ,
316
316
scalar_promotion_parametrize_inputs )
317
317
@given (shape = hh .shapes , python_scalars = st .data (), data = st .data ())
318
- def test_operator_scalar_promotion (binary_op_name , dtype , scalar_type ,
318
+ def test_operator_scalar_arg_return_promoted (binary_op_name , dtype , scalar_type ,
319
319
shape , python_scalars , data ):
320
320
"""
321
321
See https://st.data-apis.github.io/array-api/latest/API_specification/type_promotion.html#mixing-arrays-with-python-hh.scalars
0 commit comments