本文整理汇总了Python中avocado.result.TestResult.end_tests方法的典型用法代码示例。如果您正苦于以下问题:Python TestResult.end_tests方法的具体用法?Python TestResult.end_tests怎么用?Python TestResult.end_tests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类avocado.result.TestResult
的用法示例。
在下文中一共展示了TestResult.end_tests方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: end_tests
# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_tests [as 别名]
def end_tests(self):
"""
Record an end tests event.
"""
TestResult.end_tests(self)
values = {'tests': self.tests_total,
'errors': len(self.errors),
'failures': len(self.failed),
'skip': len(self.skipped),
'total_time': self.total_time}
self.xml.end_testsuite(**values)
self.xml.save(self.filename)
示例2: end_tests
# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_tests [as 别名]
def end_tests(self):
"""
Called once after all tests are executed.
"""
TestResult.end_tests(self)
self.json.update({
'total': len(self.json['tests']),
'pass': len(self.passed),
'errors': len(self.errors),
'failures': len(self.failed),
'skip': len(self.skipped),
'time': self.total_time
})
self._render_report()
示例3: end_tests
# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_tests [as 别名]
def end_tests(self):
"""
Record an end tests event.
"""
TestResult.end_tests(self)
values = {'tests': self.tests_total,
'errors': len(self.errors),
'failures': len(self.failed),
'skip': len(self.skipped),
'total_time': self.total_time}
self.xml.end_testsuite(**values)
contents = self.xml.get_contents()
if self.output == '-':
self.stream.notify(event='minor', msg=contents)
else:
with open(self.output, 'w') as xunit_output:
xunit_output.write(contents)
示例4: end_tests
# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_tests [as 别名]
def end_tests(self):
"""
Called once after all tests are executed.
"""
TestResult.end_tests(self)
self.json.update({
'total': self.tests_total,
'pass': len(self.passed),
'errors': len(self.errors),
'failures': len(self.failed),
'skip': len(self.skipped),
'time': self.total_time
})
self.json = json.dumps(self.json)
if self.args.json_output == '-':
print self.json
else:
self._save_json()
示例5: end_tests
# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_tests [as 别名]
def end_tests(self):
"""
Called once after all tests are executed.
"""
TestResult.end_tests(self)
self.json.update({
'total': self.tests_total,
'pass': len(self.passed),
'errors': len(self.errors),
'not_found': len(self.not_found),
'failures': len(self.failed),
'skip': len(self.skipped),
'time': self.total_time
})
self.json = json.dumps(self.json)
if self.args.json_output == '-':
self.view.notify(event='minor', msg=self.json)
else:
self._save_json()