當前位置: 首頁>>代碼示例>>Python>>正文


Python FinalStatus.aggregated_results方法代碼示例

本文整理匯總了Python中bzt.modules.reporting.FinalStatus.aggregated_results方法的典型用法代碼示例。如果您正苦於以下問題:Python FinalStatus.aggregated_results方法的具體用法?Python FinalStatus.aggregated_results怎麽用?Python FinalStatus.aggregated_results使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在bzt.modules.reporting.FinalStatus的用法示例。


在下文中一共展示了FinalStatus.aggregated_results方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_func_report_all_no_stacktrace

# 需要導入模塊: from bzt.modules.reporting import FinalStatus [as 別名]
# 或者: from bzt.modules.reporting.FinalStatus import aggregated_results [as 別名]
 def test_func_report_all_no_stacktrace(self):
     obj = FinalStatus()
     obj.engine = EngineEmul()
     obj.parameters = BetterDict.from_dict({"report-tests": "all", "print-stacktrace": False})
     self.sniff_log(obj.log)
     obj.prepare()
     obj.startup()
     obj.shutdown()
     obj.aggregated_results(*self.__get_func_tree())
     obj.post_process()
     info_log = self.log_recorder.info_buff.getvalue()
     self.assertIn("Total: 3 tests", info_log)
     self.assertIn("Test TestClass.case1 - PASSED", info_log)
     self.assertIn("Test TestClass.case2 - FAILED", info_log)
     self.assertIn("Test TestClass.case3 - BROKEN", info_log)
     self.assertNotIn("stacktrace2", info_log)
     self.assertNotIn("stacktrace3", info_log)
開發者ID:andy7i,項目名稱:taurus,代碼行數:19,代碼來源:test_FinalStatusReporter.py

示例2: test_func_report

# 需要導入模塊: from bzt.modules.reporting import FinalStatus [as 別名]
# 或者: from bzt.modules.reporting.FinalStatus import aggregated_results [as 別名]
 def test_func_report(self):
     obj = FinalStatus()
     obj.engine = EngineEmul()
     obj.parameters = BetterDict()
     self.sniff_log(obj.log)
     obj.prepare()
     obj.startup()
     obj.shutdown()
     obj.aggregated_results(*self.__get_func_tree())
     obj.post_process()
     info_log = self.log_recorder.info_buff.getvalue()
     warn_log = self.log_recorder.warn_buff.getvalue()
     self.assertIn("Total: 3 tests", info_log)
     self.assertIn("Test TestClass.case2 failed: something broke", warn_log)
     self.assertIn("stacktrace2", warn_log)
     self.assertIn("Test TestClass.case3 failed: something is badly broken", warn_log)
     self.assertIn("stacktrace3", warn_log)
開發者ID:andy7i,項目名稱:taurus,代碼行數:19,代碼來源:test_FinalStatusReporter.py


注:本文中的bzt.modules.reporting.FinalStatus.aggregated_results方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。