Skip to content

Commit 60607bd

Browse files
Add test_identity_error
1 parent feb1ca8 commit 60607bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dpnp/tests/test_arraycreation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,12 @@ def test_identity(n, dtype):
382382
assert_array_equal(func(numpy), func(dpnp))
383383

384384

385+
def test_identity_error():
386+
# negative dimensions
387+
with pytest.raises(ValueError):
388+
_ = dpnp.identity(-5)
389+
390+
385391
@pytest.mark.parametrize("dtype", get_all_dtypes(no_float16=False))
386392
def test_loadtxt(dtype):
387393
func = lambda xp: xp.loadtxt(fh, dtype=dtype)

0 commit comments

Comments
 (0)