本文整理汇总了Python中lldbsuite.test_event.event_builder.EventBuilder.event_for_failure方法的典型用法代码示例。如果您正苦于以下问题:Python EventBuilder.event_for_failure方法的具体用法?Python EventBuilder.event_for_failure怎么用?Python EventBuilder.event_for_failure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lldbsuite.test_event.event_builder.EventBuilder
的用法示例。
在下文中一共展示了EventBuilder.event_for_failure方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addFailure
# 需要导入模块: from lldbsuite.test_event.event_builder import EventBuilder [as 别名]
# 或者: from lldbsuite.test_event.event_builder.EventBuilder import event_for_failure [as 别名]
def addFailure(self, test, err):
if self.checkExclusion(configuration.xfail_tests, test.id()):
self.addExpectedFailure(test, err, None)
return
configuration.sdir_has_content = True
super(LLDBTestResult, self).addFailure(test, err)
method = getattr(test, "markFailure", None)
if method:
method()
if configuration.parsable:
self.stream.write("FAIL: LLDB (%s) :: %s\n" %
(self._config_string(test), str(test)))
if configuration.useCategories:
test_categories = self.getCategoriesForTest(test)
for category in test_categories:
if category in configuration.failuresPerCategory:
configuration.failuresPerCategory[
category] = configuration.failuresPerCategory[
category] + 1
else:
configuration.failuresPerCategory[category] = 1
if self.results_formatter:
self.results_formatter.handle_event(
EventBuilder.event_for_failure(test, err))