summaryrefslogtreecommitdiff
path: root/numpy/testing/numpytest.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/testing/numpytest.py')
-rw-r--r--numpy/testing/numpytest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/testing/numpytest.py b/numpy/testing/numpytest.py
index 5b7ef9953..c9a255e55 100644
--- a/numpy/testing/numpytest.py
+++ b/numpy/testing/numpytest.py
@@ -139,10 +139,13 @@ class NumpyTestCase (unittest.TestCase):
unittest.TestCase.__call__(self, result)
if nof_errors != len(result.errors):
test, errstr = result.errors[-1]
- if type(errstr) is type(()):
+ if isinstance(errstr, tuple):
errstr = str(errstr[0])
- else:
+ elif isinstance(errstr, str):
errstr = errstr.split('\n')[-2]
+ else:
+ # allow for proxy classes
+ errstr = str(errstr).split('\n')[-2]
l = len(result.stream.data)
if errstr.startswith('IgnoreException:'):
if l==1: