diff --git a/test/test_array.py b/test/test_array.py index acc818a72e09de9f8575e8b3d7bbbcb7a5a56a95..d1e08346f7ede00e7f95f22b61bd18e53c9ef405 100644 --- a/test/test_array.py +++ b/test/test_array.py @@ -1324,13 +1324,15 @@ def test_negative_dim_rejection(ctx_factory): cl_array.Array(queue, shape=-10, dtype=np.float) with pytest.raises(ValueError): - cl_array.Array(queue, shape=(-1, +1), dtype=np.float) + cl_array.Array(queue, shape=(-10,), dtype=np.float) - with pytest.raises(ValueError): - cl_array.Array(queue, shape=(+1, -1), dtype=np.float) + for left_dim in (-1, 0, 1): + with pytest.raises(ValueError): + cl_array.Array(queue, shape=(left_dim, -1), dtype=np.float) - with pytest.raises(ValueError): - cl_array.Array(queue, shape=(-1, -1), dtype=np.float) + for right_dim in (-1, 0, 1): + with pytest.raises(ValueError): + cl_array.Array(queue, shape=(-1, right_dim), dtype=np.float) if __name__ == "__main__":