浏览代码

Log the backtrace when the backtrace test fails

cypherpunks 8 年之前
父节点
当前提交
afc5af3f00
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      src/test/bt_test.py

+ 6 - 3
src/test/bt_test.py

@@ -15,6 +15,7 @@ OK
 
 """
 
+from __future__ import print_function
 import sys
 
 
@@ -37,6 +38,8 @@ for I in range(len(LINES)):
     if matches(LINES[I:], FUNCNAMES):
         print("OK")
         sys.exit(0)
-else:
-    print("BAD")
-    sys.exit(1)
+
+for l in LINES:
+    print("{}".format(l), end="")
+
+sys.exit(1)