提交 77f72642 authored 作者: Frederic's avatar Frederic

Small fix to the new error just created.

上级 091027dd
......@@ -1809,7 +1809,6 @@ class _Linker(gof.link.LocalLinker):
"The information we have about this optimizations is:" + str(reason) +
"The original exception: " + str(e))
new_e = OptimizationInsertError(msg)
new_e.reason = opt
exc_type, exc_value, exc_trace = sys.exc_info()
exc_type = OptimizationInsertError
exc_value = new_e
......@@ -1906,7 +1905,6 @@ class _Linker(gof.link.LocalLinker):
"The information we have about this optimizations is:" + str(reason) +
"The original exception: " + str(e))
new_e = OptimizationInsertError(msg)
new_e.reason = opt
exc_type, exc_value, exc_trace = sys.exc_info()
exc_type = OptimizationInsertError
exc_value = new_e
......
......@@ -275,7 +275,7 @@ def test_badoptimization_opt_err():
try:
f([1.0, 2.0, 3.0], [2, 3, 4],)
except debugmode.OptimizationInsertError, e:
assert str(e.reason) == 'insert_bigger_b_add'
assert 'insert_bigger_b_add' in e.message
return # TEST PASS
assert False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论