diff options
author | cookedm <cookedm@localhost> | 2006-07-14 19:49:44 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2006-07-14 19:49:44 +0000 |
commit | c47e6cb2d885c753ece0667fa3f5fad74668e314 (patch) | |
tree | a06453c1bbb367aa7634f8892eacfae0b71e5f0c /numpy/testing/utils.py | |
parent | cf0dd874261547add03a56baf14b4d5102f64f1e (diff) | |
download | numpy-c47e6cb2d885c753ece0667fa3f5fad74668e314.tar.gz |
make printed errors from approx_array_* better
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r-- | numpy/testing/utils.py | 4 |
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) |