Skip to content

Commit 6829b0e

Browse files
Correction for test_full_gh_1230 test
Test now takes it parameter argument into account.
1 parent 26b8e99 commit 6829b0e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

dpctl/tests/test_usm_ndarray_ctor.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,16 +1794,15 @@ def test_full_strides():
17941794
@pytest.mark.parametrize("dt", ["i1", "u1", "i2", "u2", "i4", "u4", "i8", "u8"])
17951795
def test_full_gh_1230(dt):
17961796
q = get_queue_or_skip()
1797-
dtype = "i4"
1798-
dt_maxint = dpt.iinfo(dtype).max
1797+
dt_maxint = dpt.iinfo(dt).max
17991798

18001799
if np.lib.NumpyVersion(np.__version__) < "2.0.0":
1801-
X = dpt.full(1, fill_value=(dt_maxint + 1), dtype=dtype, sycl_queue=q)
1802-
Y = dpt.full_like(X, fill_value=dpt.iinfo(dtype).min)
1800+
X = dpt.full(1, fill_value=(dt_maxint + 1), dtype=dt, sycl_queue=q)
1801+
Y = dpt.full_like(X, fill_value=dpt.iinfo(dt).min)
18031802
assert dpt.all(X == Y)
18041803
else:
18051804
with pytest.raises(OverflowError):
1806-
dpt.full(1, dt_maxint + 1, dtype=dtype, sycl_queue=q)
1805+
dpt.full(1, dt_maxint + 1, dtype=dt, sycl_queue=q)
18071806

18081807

18091808
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)