TestRunner.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:auto_api 作者: pencil1 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号