提交 58a1e52c authored 作者: Frederic Bastien's avatar Frederic Bastien

Better error message to help debug travis problem

上级 3e024c1f
......@@ -49,8 +49,10 @@ def test_gc_never_pickles_temporaries():
g = theano.function([x], r, mode=theano.Mode(optimizer=optimizer,
linker=g_linker))
len_pre_f = len(pickle.dumps(f))
len_pre_g = len(pickle.dumps(g))
pre_f = pickle.dumps(f)
pre_g = pickle.dumps(g)
len_pre_f = len(pre_f)
len_pre_g = len(pre_g)
# We can't compare the content or the length of the string
# between f and g. 2 reason, we store some timming information
......@@ -87,6 +89,9 @@ def test_gc_never_pickles_temporaries():
# assert that f() didn't cause the function to grow
# allow_gc should leave the function un-changed by calling
if len_pre_f != len_post_f:
print(pre_f)
print(post_f)
assert len_pre_f == len_post_f
# assert that g() didn't cause g to grow because temporaries
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论