<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf_8'> Time Elapsed: 0:00:21.316335
解决方案:
将HTMLTestRunner脚本的第631行的 print >> sys.stderr, ' Time Elapsed: %s' % (self.stopTime-self.startTime) 或print(sys.stderr, ' Time Elapsed: %s' % (self.stopTime-self.startTime)) 修改为 sys.stderr.write(' Time Elapsed: %s ' % (self.stopTime - self.startTime))