Skip to content

Commit f1db9e8

Browse files
committed
Add more tests coverage
1 parent 89f7cba commit f1db9e8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dpnp/tests/test_ndarray.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ def test_strides(self):
107107
assert xp.full_like(a, fill_value=6) not in a
108108

109109

110+
class TestToList:
111+
@pytest.mark.parametrize(
112+
"data", [[1, 2], [[1, 2], [3, 4]]], ids=["1d", "2d"]
113+
)
114+
def test_1d(self, data):
115+
a = numpy.array(data)
116+
ia = dpnp.array(a)
117+
assert_array_equal(ia.tolist(), a.tolist())
118+
119+
110120
class TestView:
111121
def test_none_dtype(self):
112122
a = numpy.ones((1, 2, 4), dtype=numpy.int32)

0 commit comments

Comments
 (0)