提交 a56e6d85 authored 作者: abergeron's avatar abergeron 提交者: GitHub

Merge pull request #6366 from yikangshen/pickling_test_flag

Flag to disable pickling test values
......@@ -527,10 +527,10 @@ class Variable(Node):
d = self.__dict__.copy()
d.pop("_fn_cache", None)
if (not config.pickle_test_value) \
and (hasattr(self.tag, 'test_value')) \
and (not type(config).pickle_test_value.is_default):
warnings.warn("pickle_test_value is not defaut value (True).\n"
"Test value of variable %s(%s) will not be dumped." % (d['auto_name'], d['name']))
and (hasattr(self.tag, 'test_value')):
if not type(config).pickle_test_value.is_default:
warnings.warn("pickle_test_value is not defaut value (True).\n"
"Test value of variable %s(%s) will not be dumped." % (d['auto_name'], d['name']))
t = copy(d["tag"])
del t.test_value
d["tag"] = t
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论