美文网首页
python3的html文件更改如下

python3的html文件更改如下

作者: 测试的旅途中 | 来源:发表于2018-03-14 20:33 被阅读0次

    具体改动如下:
    第94行,将import StringIO修改成import io
    第539行,将self.outputBuffer = StringIO.StringIO()修改成self.outputBuffer= io.StringIO()
    第631行,将print >> sys.stderr, ‘\nTime Elapsed: %s‘ %(self.stopTime-self.startTime)修改成print(sys.stderr, ‘\nTimeElapsed: %s‘ % (self.stopTime-self.startTime))
    第642行,将if not rmap.has_key(cls):修改成if notcls in rmap:
    第766行,将uo = o.decode(‘latin-1‘)修改成uo = e
    第775行,将ue = e.decode(‘latin-1‘)修改成ue = e
    第778行,将output = saxutils.escape(uo+ue),修改成output = saxutils.escape(str(uo)+str(ue)),
    将上述几处改动,保存成功后,再将HTMLTestRunner.py放到C:\Python34\Lib目录中,检验是否加载成功,在Python IDLE 中输入

    相关文章

      网友评论

          本文标题:python3的html文件更改如下

          本文链接:https://www.haomeiwen.com/subject/culzzxtx.html