未验证 提交 fa907cfd 编写于 作者: C Cleber Rosa

Merge remote-tracking branch 'apahim/local_variables'

......@@ -453,6 +453,11 @@ class Test(unittest.TestCase):
if not isinstance(details, Exception): # Avoid passing nasty exc
details = exceptions.TestError("%r: %s" % (details, details))
test_exception = details
stacktrace.log_message('Local variables:', logger='avocado.test')
local_vars = inspect.trace()[1][0].f_locals
for key, value in local_vars.iteritems():
stacktrace.log_message(' -> %s: %s' % (key, value),
logger='avocado.test')
finally:
try:
self.tearDown()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册