Skip to content

Commit 290ab65

Browse files
authored
Remove filtering DeprecationWarning raised by numpy.bincount in the test (#2718)
The PR removes muting `DeprecationWarning` which might be raised by older `numpy.bincount` in the test. Instead it proposes to require `"numpy>=2.3.0"` to run the test.
1 parent 9218f1c commit 290ab65

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

dpnp/tests/test_histogram.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
has_support_aspect64,
2424
numpy_version,
2525
)
26+
from .third_party.cupy import testing
2627

2728

2829
class TestDigitize:
@@ -610,21 +611,8 @@ def test_minlength(self, array, minlength):
610611
result = dpnp.bincount(ia, minlength=minlength)
611612
assert_allclose(result, expected)
612613

613-
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
614-
@pytest.mark.parametrize(
615-
"xp",
616-
[
617-
dpnp,
618-
pytest.param(
619-
numpy,
620-
marks=pytest.mark.xfail(
621-
numpy_version() < "2.3.0",
622-
reason="numpy deprecates but accepts that",
623-
strict=True,
624-
),
625-
),
626-
],
627-
)
614+
@testing.with_requires("numpy>=2.3.0")
615+
@pytest.mark.parametrize("xp", [dpnp, numpy])
628616
def test_minlength_none(self, xp):
629617
a = xp.array([1, 2, 3])
630618
assert_raises_regex(

0 commit comments

Comments
 (0)