def run_test(self, suite):
if not os.path.exists('report'): # ??????????????????
os.makedirs('report')
report_name = "report\{}-{}.html".format("report",
time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(time.time())))
with open(report_name, "wb") as f:
runner = BSTestRunner(stream=f, title='{}???????'.format(self.name))
runner.run(suite)
log.info("{}?????????????".format(self.name))
os.system("start {}".format(report_name))
评论列表
文章目录