Skip to content

Commit 8cc35f1

Browse files
Reset print options in test_print_dpnp_1d
1 parent e11366e commit 8cc35f1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dpnp/tests/test_ndarray.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,19 @@ def test_print_dpnp_special_character(character):
491491

492492

493493
def test_print_dpnp_1d():
494+
# Reset print options to defaults to avoid test pollution
495+
dpt.set_print_options(
496+
linewidth=75,
497+
edgeitems=3,
498+
threshold=1000,
499+
precision=8,
500+
floatmode="maxprec",
501+
suppress=False,
502+
nanstr="nan",
503+
infstr="inf",
504+
sign="-",
505+
)
506+
494507
dtype = dpnp.default_float_type()
495508
result = repr(dpnp.arange(10000, dtype=dtype))
496509
expected = "array([0.000e+00, 1.000e+00, 2.000e+00, ..., 9.997e+03, 9.998e+03,\n 9.999e+03], shape=(10000,))"

0 commit comments

Comments
 (0)