HTMLTestRunner和微信Fautotest结合,报告:TypeError: unicode argument expected, got ‘str’
如果按照网上的方法,将这里的StringIO改为BytesIO,并修改import os。
def startTest(self, test):
TestResult.startTest(self, test)
# just one buffer for both stdout and stderr
self.outputBuffer = io.StringIO()
虽然测试可以运行了。
但是仍然会有错误:
TypeError: ‘unicode’ does not have the buffer interface
修改方法:
把报错的这个地方decode为utf-8编码。