Skip to content

Commit 25a2c6a

Browse files
Add test_create_from_usm_ndarray_error
1 parent ca5ba5b commit 25a2c6a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

dpnp/tests/test_arraycreation.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,20 @@ def test_arange(start, stop, step, dtype):
214214
assert_array_equal(exp_array, res_array)
215215

216216

217+
@pytest.mark.parametrize(
218+
"arr",
219+
[
220+
numpy.array([1]),
221+
dpnp.array([1]),
222+
[1],
223+
],
224+
ids=["numpy", "dpnp", "list"],
225+
)
226+
def test_create_from_usm_ndarray_error(arr):
227+
with pytest.raises(TypeError):
228+
dpnp.dpnp_array.dpnp_array._create_from_usm_ndarray(arr)
229+
230+
217231
@pytest.mark.parametrize("func", ["diag", "diagflat"])
218232
@pytest.mark.parametrize("k", [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6])
219233
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)