提交 78ef9de3 authored 作者: Frederic Bastien's avatar Frederic Bastien

Better test error infomation

上级 aac0bd8d
...@@ -90,9 +90,16 @@ def test_gc_never_pickles_temporaries(): ...@@ -90,9 +90,16 @@ def test_gc_never_pickles_temporaries():
# assert that f() didn't cause the function to grow # assert that f() didn't cause the function to grow
# allow_gc should leave the function un-changed by calling # allow_gc should leave the function un-changed by calling
if len_pre_f != len_post_f: if len_pre_f != len_post_f:
print(pre_f) for i in range(len_pre_f//100):
print(post_f) p1 = pre_f[i*100:(i+1)*100]
assert len_pre_f == len_post_f p2 = post_f[i*100:(i+1)*100]
if p1 != p2:
print(i)
print("p1")
print(p1)
print("p2")
print(p2)
assert len_pre_f == len_post_f, (len_pre_f, len_post_f)
# assert that g() didn't cause g to grow because temporaries # assert that g() didn't cause g to grow because temporaries
# that weren't collected shouldn't be pickled anyway # that weren't collected shouldn't be pickled anyway
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论