当前位置: 首页>>代码示例>>Python>>正文


Python FinalStatus.prepare方法代码示例

本文整理汇总了Python中bzt.modules.reporting.FinalStatus.prepare方法的典型用法代码示例。如果您正苦于以下问题:Python FinalStatus.prepare方法的具体用法?Python FinalStatus.prepare怎么用?Python FinalStatus.prepare使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bzt.modules.reporting.FinalStatus的用法示例。


在下文中一共展示了FinalStatus.prepare方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_log_messages_duration

# 需要导入模块: from bzt.modules.reporting import FinalStatus [as 别名]
# 或者: from bzt.modules.reporting.FinalStatus import prepare [as 别名]
 def test_log_messages_duration(self):
     """
     Test duration report
     :return:
     """
     obj = FinalStatus()
     obj.parameters = BetterDict()
     obj.log = logger_mock()
     obj.prepare()
     obj.start_time -= 120005
     obj.post_process()
     self.assertEqual("Test duration: 1 day, 9:20:05\n", obj.log.info_buf.getvalue())
开发者ID:kobi1023,项目名称:taurus,代码行数:14,代码来源:test_FinalStatsReporter.py

示例2: test_log_messages_duration

# 需要导入模块: from bzt.modules.reporting import FinalStatus [as 别名]
# 或者: from bzt.modules.reporting.FinalStatus import prepare [as 别名]
 def test_log_messages_duration(self):
     """
     Test duration report
     :return:
     """
     obj = FinalStatus()
     obj.parameters = BetterDict()
     log_recorder = RecordingHandler()
     obj.log.addHandler(log_recorder)
     obj.prepare()
     obj.start_time -= 120005
     obj.post_process()
     self.assertEqual("Test duration: 1 day, 9:20:05\n", log_recorder.info_buff.getvalue())
     obj.log.removeHandler(log_recorder)
开发者ID:itaymendel,项目名称:taurus,代码行数:16,代码来源:test_FinalStatusReporter.py

示例3: test_log_messages_duration

# 需要导入模块: from bzt.modules.reporting import FinalStatus [as 别名]
# 或者: from bzt.modules.reporting.FinalStatus import prepare [as 别名]
 def test_log_messages_duration(self):
     """
     Test duration report
     :return:
     """
     obj = FinalStatus()
     obj.engine = EngineEmul()
     obj.parameters = BetterDict()
     self.sniff_log(obj.log)
     obj.prepare()
     obj.startup()
     obj.shutdown()
     obj.start_time -= 120005
     obj.post_process()
     self.assertEqual("Test duration: 1 day, 9:20:05\n", self.log_recorder.info_buff.getvalue())
开发者ID:andy7i,项目名称:taurus,代码行数:17,代码来源:test_FinalStatusReporter.py

示例4: test_func_report_all_no_stacktrace

# 需要导入模块: from bzt.modules.reporting import FinalStatus [as 别名]
# 或者: from bzt.modules.reporting.FinalStatus import prepare [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

示例5: test_func_report

# 需要导入模块: from bzt.modules.reporting import FinalStatus [as 别名]
# 或者: from bzt.modules.reporting.FinalStatus import prepare [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.prepare方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。