本文整理汇总了Python中scanner.Scanner.parse方法的典型用法代码示例。如果您正苦于以下问题:Python Scanner.parse方法的具体用法?Python Scanner.parse怎么用?Python Scanner.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scanner.Scanner
的用法示例。
在下文中一共展示了Scanner.parse方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_build_fail_two
# 需要导入模块: from scanner import Scanner [as 别名]
# 或者: from scanner.Scanner import parse [as 别名]
def test_build_fail_two(self):
report = Report.from_string(self.BUILD_FAIL_2)
scanner = Scanner(report, [BuildFail()])
for ev in scanner.parse():
report.add_event(ev)
self.logger.log(logging.DEBUG, "event: %s", str(ev))
self.assertEqual(report.count(), 2)
report.report()
示例2: test_skipped_conflict
# 需要导入模块: from scanner import Scanner [as 别名]
# 或者: from scanner.Scanner import parse [as 别名]
def test_skipped_conflict(self):
report = Report.from_string(self.SKIPPED_CONFLICT)
scanner = Scanner(report, [SkippedConflict()])
for ev in scanner.parse():
report.add_event(ev)
self.logger.log(logging.DEBUG, "event: %s", str(ev))
report.report()
self.assertEqual(report.count(), 1)
示例3: test_multipleinstances
# 需要导入模块: from scanner import Scanner [as 别名]
# 或者: from scanner.Scanner import parse [as 别名]
def test_multipleinstances(self):
report = Report.from_string(self.MULTIPLEINSTANCES)
scanner = Scanner(report, [MultipleInstances()])
for ev in scanner.parse():
report.add_event(ev)
self.logger.log(logging.INFO, "event: %s", str(ev))
self.assertEqual(report.count(), 1)
report.report()