Skip to content

Commit ac331bb

Browse files
committed
Added a test for roll input validation
- Will cover lines missed by test suite
1 parent 8c6e99c commit ac331bb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dpctl/tests/test_usm_ndarray_manipulation.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,19 @@ def test_roll_2d(data):
648648
assert_array_equal(Ynp, dpt.asnumpy(Y))
649649

650650

651+
def test_roll_validation():
652+
get_queue_or_skip()
653+
654+
X = dict()
655+
with pytest.raises(TypeError):
656+
dpt.roll(X)
657+
658+
X = dpt.empty((1, 2, 3))
659+
shift = ((2, 3, 1), (1, 2, 3))
660+
with pytest.raises(ValueError):
661+
dpt.roll(X, shift=shift, axis=(0, 1, 2))
662+
663+
651664
def test_concat_incorrect_type():
652665
Xnp = np.ones((2, 2))
653666
pytest.raises(TypeError, dpt.concat)

0 commit comments

Comments
 (0)