summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
authorcookedm <cookedm@localhost>2006-07-14 19:49:44 +0000
committercookedm <cookedm@localhost>2006-07-14 19:49:44 +0000
commitc47e6cb2d885c753ece0667fa3f5fad74668e314 (patch)
treea06453c1bbb367aa7634f8892eacfae0b71e5f0c /numpy/testing/utils.py
parentcf0dd874261547add03a56baf14b4d5102f64f1e (diff)
downloadnumpy-c47e6cb2d885c753ece0667fa3f5fad74668e314.tar.gz
make printed errors from approx_array_* better
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index a38ea260d..98e1c2a26 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -114,7 +114,9 @@ def build_err_msg(arrays, err_msg, header='Items are not equal:',
r = repr(a)
except:
r = '[repr failed]'
- r = r[:100]
+ if r.count('\n') > 3:
+ r = '\n'.join(r.splitlines()[:3])
+ r += '...'
msg.append(' %s: %s' % (names[i], r))
return '\n'.join(msg)