Skip to content

Commit 3462bfb

Browse files
committed
Add test coverage
1 parent a9eed13 commit 3462bfb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dpnp/tests/test_indexing.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,14 @@ def test_triu_indices(n, k, m):
11721172
assert_array_equal(expected, result)
11731173

11741174

1175+
@pytest.mark.parametrize("k", [3.2, dpnp.bool(0), numpy.array(3.14)])
1176+
def test_triu_indices_error(k):
1177+
with pytest.raises(
1178+
TypeError, match="`k` must be a integer data type, but got"
1179+
):
1180+
dpnp.triu_indices(n=4, k=k)
1181+
1182+
11751183
@pytest.mark.parametrize("k", [-3, -2, -1, 0, 1, 2, 3])
11761184
@pytest.mark.parametrize(
11771185
"array",

0 commit comments

Comments
 (0)