Skip to content

Commit 25c80e6

Browse files
authored
fix failed test in test_ndarray.py (#2435)
The behavior of `repr` was modified in IntelPython/dpctl#2067. Tests in `dpnp` should be modified to align with this new behavior.
1 parent 2c19355 commit 25c80e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dpnp/tests/test_ndarray.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def test_print_dpnp_special_character(character):
333333
def test_print_dpnp_1d():
334334
dtype = dpnp.default_float_type()
335335
result = repr(dpnp.arange(10000, dtype=dtype))
336-
expected = "array([0.000e+00, 1.000e+00, 2.000e+00, ..., 9.997e+03, 9.998e+03,\n 9.999e+03])"
336+
expected = "array([0.000e+00, 1.000e+00, 2.000e+00, ..., 9.997e+03, 9.998e+03,\n 9.999e+03], shape=(10000,))"
337337
if not has_support_aspect64():
338338
expected = expected[:-1] + ", dtype=float32)"
339339
assert result == expected
@@ -361,9 +361,9 @@ def test_print_dpnp_2d():
361361
def test_print_dpnp_zero_shape():
362362
result = repr(dpnp.empty(shape=(0, 0)))
363363
if has_support_aspect64():
364-
expected = "array([])"
364+
expected = "array([], shape=(0, 0), dtype=float64)"
365365
else:
366-
expected = "array([], dtype=float32)"
366+
expected = "array([], shape=(0, 0), dtype=float32)"
367367
assert result == expected
368368

369369
result = str(dpnp.empty(shape=(0, 0)))

0 commit comments

Comments
 (0)