summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
authorMark Wiebe <mwwiebe@gmail.com>2011-08-07 11:45:04 -0700
committerCharles Harris <charlesr.harris@gmail.com>2011-08-27 07:26:53 -0600
commit9acbfb38b0f564942f55ac1eafc64b43443b4c52 (patch)
tree44bd3a7b4875ec7a343a23381ed9d24124ff6a16 /numpy/testing/utils.py
parent0d9f27dcc6f69e2f43224f7da292710f68eb9411 (diff)
downloadnumpy-9acbfb38b0f564942f55ac1eafc64b43443b4c52.tar.gz
ENH: missingdata: Fix remaining issues in scalar -> array assignment function
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index eae343304..7753427c0 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -634,7 +634,10 @@ def assert_array_compare(comparison, x, y, err_msg='', verbose=True,
if not cond :
raise AssertionError(msg)
except ValueError, e:
- header = 'error during assertion:\n%s\n\n%s' % (e, header)
+ import traceback
+ efmt = traceback.format_exc()
+ header = 'error during assertion:\n\n%s\n\n%s' % (efmt, header)
+
msg = build_err_msg([x, y], err_msg, verbose=verbose, header=header,
names=('x', 'y'))
raise ValueError(msg)