summaryrefslogtreecommitdiff
path: root/numpy/testing/tests/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/testing/tests/test_utils.py')
-rw-r--r--numpy/testing/tests/test_utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index c1d0e83da..5189f7e63 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -452,8 +452,12 @@ class TestAssertAllclose(unittest.TestCase):
def test_report_fail_percentage(self):
a = np.array([1, 1, 1, 1])
b = np.array([1, 1, 1, 2])
- with self.assertRaisesRegexp(AssertionError, "25.0%"):
+ try:
assert_allclose(a, b)
+ msg = ''
+ except AssertionError as exc:
+ msg = exc.args[0]
+ self.assertTrue("mismatch 25.0%" in msg)
class TestArrayAlmostEqualNulp(unittest.TestCase):
@dec.knownfailureif(True, "Github issue #347")