Skip to content

Commit d691846

Browse files
Added a test for broadcasting error
1 parent 05ae945 commit d691846

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dpctl/tests/elementwise/test_add.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ def test_add_broadcasting():
144144
).all()
145145

146146

147+
def test_add_broadcasting_error():
148+
get_queue_or_skip()
149+
m = dpt.ones((10, 10), dtype="i4")
150+
v = dpt.ones((3,), dtype="i4")
151+
with pytest.raises(ValueError):
152+
dpt.add(m, v)
153+
154+
147155
@pytest.mark.parametrize("arr_dt", _all_dtypes)
148156
def test_add_python_scalar(arr_dt):
149157
q = get_queue_or_skip()

0 commit comments

Comments
 (0)