HTMLTestRunner生成测试报告时报错:write() argument must be str, not bytes
文章目录
使用python3时,以file = open(os.getcwd() + "/report.html","w")的方式生成报告会报write() argument must be str, not bytes错,如图。解决方法时把"w"改为"wb"。

生成的html报告
使用python3时,以file = open(os.getcwd() + "/report.html","w")的方式生成报告会报write() argument must be str, not bytes错,如图。解决方法时把"w"改为"wb"。

生成的html报告
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论