summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_classes.py
diff options
context:
space:
mode:
authorpatto90 <andrea.pattori@gmail.com>2019-07-14 09:41:17 -0500
committerpatto90 <andrea.pattori@gmail.com>2019-07-14 09:41:17 -0500
commitb7d56364ca473e9c5a88f90ed0c6ae188b4f1389 (patch)
tree9414be7afc91aa84866dc660cc28960687747f85 /numpy/polynomial/tests/test_classes.py
parentf7f0ee628218534b41d32c1eefb4298f7b4f1d34 (diff)
downloadnumpy-b7d56364ca473e9c5a88f90ed0c6ae188b4f1389.tar.gz
check also warning message
Diffstat (limited to 'numpy/polynomial/tests/test_classes.py')
-rw-r--r--numpy/polynomial/tests/test_classes.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/polynomial/tests/test_classes.py b/numpy/polynomial/tests/test_classes.py
index 91426cece..2261f960b 100644
--- a/numpy/polynomial/tests/test_classes.py
+++ b/numpy/polynomial/tests/test_classes.py
@@ -13,7 +13,7 @@ import numpy as np
from numpy.polynomial import (
Polynomial, Legendre, Chebyshev, Laguerre, Hermite, HermiteE)
from numpy.testing import (
- assert_almost_equal, assert_raises, assert_equal, assert_, assert_warns,
+ assert_almost_equal, assert_raises, assert_equal, assert_,
)
from numpy.compat import long
from numpy.polynomial.polyutils import RankWarning
@@ -139,8 +139,9 @@ def test_bad_conditioned_fit(Poly):
y = [1., 2., 3.]
# check RankWarning is raised
- with assert_warns(RankWarning):
+ with pytest.warns(RankWarning) as record:
Poly.fit(x, y, 2)
+ assert record[0].message.args[0] == "The fit may be poorly conditioned"
def test_fit(Poly):