Skip to content

Commit 94eaac2

Browse files
Update TestSpacing::test_zeros using assert_dtype_allclose
1 parent 659629d commit 94eaac2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpnp/tests/test_mathematical.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,13 +2112,13 @@ def test_zeros(self, dt):
21122112
result = dpnp.spacing(ia)
21132113
expected = numpy.spacing(a)
21142114
if numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0":
2115-
assert_equal(result, expected)
2115+
assert_dtype_allclose(result, expected)
21162116
else:
21172117
# numpy.spacing(-0.0) == numpy.spacing(0.0), i.e. NumPy returns
21182118
# positive value (looks as a bug in NumPy), because for any other
21192119
# negative input the NumPy result will be also a negative value.
21202120
expected[1] *= -1
2121-
assert_equal(result, expected)
2121+
assert_dtype_allclose(result, expected)
21222122

21232123
@pytest.mark.parametrize("dt", get_float_dtypes(no_float16=False))
21242124
@pytest.mark.parametrize("val", [1, 1e-5, 1000])

0 commit comments

Comments
 (0)