|
5 | 5 | from typing import List, Tuple, Union
|
6 | 6 |
|
7 | 7 | import pytest
|
8 |
| -from hypothesis import assume, given, reject |
| 8 | +from hypothesis import given, reject |
9 | 9 | from hypothesis import strategies as st
|
10 | 10 |
|
11 | 11 | from . import _array_module as xp
|
@@ -258,15 +258,15 @@ def test_op_promotion(op, expr, in_dtypes, out_dtype, data):
|
258 | 258 |
|
259 | 259 |
|
260 | 260 | @pytest.mark.parametrize("op, expr, in_dtypes, out_dtype", inplace_params)
|
261 |
| -@given(shapes=hh.mutually_broadcastable_shapes(2), data=st.data()) |
262 |
| -def test_inplace_op_promotion(op, expr, in_dtypes, out_dtype, shapes, data): |
263 |
| - assume(len(shapes[0]) >= len(shapes[1])) |
| 261 | +@given(shape=hh.shapes(), data=st.data()) |
| 262 | +def test_inplace_op_promotion(op, expr, in_dtypes, out_dtype, shape, data): |
| 263 | + # TODO: test broadcastable shapes (that don't change x1's shape) |
264 | 264 | elements = func_elements[func_name]
|
265 | 265 | x1 = data.draw(
|
266 |
| - xps.arrays(dtype=in_dtypes[0], shape=shapes[0], elements=elements), label="x1" |
| 266 | + xps.arrays(dtype=in_dtypes[0], shape=shape, elements=elements), label="x1" |
267 | 267 | )
|
268 | 268 | x2 = data.draw(
|
269 |
| - xps.arrays(dtype=in_dtypes[1], shape=shapes[1], elements=elements), label="x2" |
| 269 | + xps.arrays(dtype=in_dtypes[1], shape=shape, elements=elements), label="x2" |
270 | 270 | )
|
271 | 271 | locals_ = {"x1": x1, "x2": x2}
|
272 | 272 | try:
|
|
0 commit comments