是否可以在pyunitest中实现多个测试运行器?而只运行一次测试套件]] <<

问题描述 投票:0回答:1
if __name__ == '__main__': if is_running_under_teamcity(): runner = TeamcityTestRunner() else: runner = HTMLTestRunner.HTMLTestRunner( stream=outfile, title='Test Report', description='This is an example.' ) unittest.main(testRunner=runner)
我目前正在使用python中的unittest模块运行一些测试,这是我上面的当前代码。我正在Teamcity上部署此测试设置,第一个模块允许我将输出转换为teamcity-messages,第二个模块创建结果的html报告。有办法只运行一组测试就可以同时运行这两个运行程序吗?我可以看到的唯一选择是尝试将这两个模块组合为混合模块,或者使用Teamcity支持的另一个测试模块。但是,我希望保持较低的依存关系

任何想法都很棒:)

如果__name__ =='__main__':如果is_running_under_teamcity():Runner = TeamcityTestRunner()否则:Runner = HTMLTestRunner.HTMLTestRunner(stream = outfile,...

python python-3.x teamcity python-unittest runner
1个回答
0
投票
任何想法都很棒:)
© www.soinside.com 2019 - 2024. All rights reserved.