use `assert_warns`
@@ -45,11 +45,11 @@ class TestPolynomial(unittest.TestCase):
@testing.with_requires('numpy>=1.17')
@testing.for_all_dtypes()
- def test_polyvander_integral_float_degree(self, dtype):
- for xp in (numpy, cupy):
+ @testing.numpy_cupy_allclose(rtol=1e-5)
+ def test_polyvander_integral_float_degree(self, xp, dtype):
a = testing.shaped_random((10,), xp, dtype)
- with pytest.raises(DeprecationWarning):
- xp.polynomial.polynomial.polyvander(a, 5.0)
+ with testing.assert_warns(DeprecationWarning):
+ return xp.polynomial.polynomial.polyvander(a, 5.0)
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
