常见错误1:
HTMLTestRunner运行测试套件报错---TypeError: 'module' object is not callable
产生原因:文章源自玩技e族-https://www.playezu.com/26308.html
HTMLTestRunner 中存在 HTMLTestRunner 方法,如果调用的是 HTMLTestRunner 整个类名则无效。需要调用到其中有效的方法才可以。文章源自玩技e族-https://www.playezu.com/26308.html
原始代码:文章源自玩技e族-https://www.playezu.com/26308.html
runner = HTMLTestRunner(stream=file, verbosity=1,title='标题', description='描述') runner.run(suite)
修改代码:文章源自玩技e族-https://www.playezu.com/26308.html
runner = HTMLTestRunner.HTMLTestRunner(stream=file, verbosity=1,title='标题', description='描述')
runner.run(suite)
文章源自玩技e族-https://www.playezu.com/26308.html文章源自玩技e族-https://www.playezu.com/26308.html
评论