提交 da5780bb authored 作者: Frederic Bastien's avatar Frederic Bastien

more backport.

上级 8ef9a3f0
...@@ -392,6 +392,7 @@ class T_picklefunction(unittest.TestCase): ...@@ -392,6 +392,7 @@ class T_picklefunction(unittest.TestCase):
old_default_mode = config.mode old_default_mode = config.mode
old_default_opt = config.optimizer old_default_opt = config.optimizer
old_default_link = config.linker old_default_link = config.linker
try:
try: try:
str_f = cPickle.dumps(f) str_f = cPickle.dumps(f)
config.mode = 'Mode' config.mode = 'Mode'
......
...@@ -7,7 +7,9 @@ def run(TF): ...@@ -7,7 +7,9 @@ def run(TF):
if TF and RUN_TESTS: if TF and RUN_TESTS:
print 'running test', f.__name__ print 'running test', f.__name__
f() f()
return f if RUN_TESTS else None if RUN_TESTS:
return f
else: return None
return deco return deco
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论