summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_polynomial.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial/tests/test_polynomial.py')
-rw-r--r--numpy/polynomial/tests/test_polynomial.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/polynomial/tests/test_polynomial.py b/numpy/polynomial/tests/test_polynomial.py
index c90075dfe..50973c480 100644
--- a/numpy/polynomial/tests/test_polynomial.py
+++ b/numpy/polynomial/tests/test_polynomial.py
@@ -7,7 +7,7 @@ import numpy as np
import numpy.polynomial.polynomial as poly
from numpy.testing import (
assert_almost_equal, assert_raises, assert_equal, assert_,
- assert_warns, assert_array_equal)
+ assert_warns, assert_array_equal, assert_raises_regex)
def trim(x):
@@ -227,7 +227,8 @@ class TestEvaluation:
y1, y2, y3 = self.y
#test exceptions
- assert_raises(ValueError, poly.polyval2d, x1, x2[:2], self.c2d)
+ assert_raises_regex(ValueError, 'incompatible',
+ poly.polyval2d, x1, x2[:2], self.c2d)
#test values
tgt = y1*y2
@@ -244,7 +245,8 @@ class TestEvaluation:
y1, y2, y3 = self.y
#test exceptions
- assert_raises(ValueError, poly.polyval3d, x1, x2, x3[:2], self.c3d)
+ assert_raises_regex(ValueError, 'incompatible',
+ poly.polyval3d, x1, x2, x3[:2], self.c3d)
#test values
tgt = y1*y2*y3