写了一个测试用例,可以正常运行,但是添加了HTMLTestRunner模块后,打开报告,会有如下错误
ft3.1: b''Traceback (most recent call last):
File "C:\Python34\enbrel_login\login_case\start_003.py", line 44, in test_uploadfile
print("当前文件数:%d"%n)
File "C:\Python34\lib\HTMLTestRunner.py", line 118, in write self.fp.write(s)
TypeError: 'str' does not support the buffer interface
应该是测试用例里面的print 语句的类型引起的,注释掉这一行,就没有报错了,有人知道应该怎么改吗?