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"。
HTMLTestRunner生成测试报告时报错:write() argument must be str, not bytes_第1张图片

HTMLTestRunner生成测试报告时报错:write() argument must be str, not bytes_第2张图片

你可能感兴趣的:(测试自动化)