saryli
1.在代码中加入下面的代码并保存:
  1. # -.- coding:utf-8 -.-
  2. import sys
  3. reload(sys)
  4. sys.setdefaultencoding(\'utf-8\')

2.找到HTMLTestRunner.py源码 

定位到如下位置,o.decode(‘latin-1’)编码“latin-1”修改为“utf-8”


if isinstance(o,str):
    # TODO: some problem with \'string_escape\': it escape \n and mess up formating
    # uo = unicode(o.encode(\'string_escape\'))
    uo = o.decode(\'utf-8\')
else:
    uo = o
if isinstance(e,str):
    # TODO: some problem with \'string_escape\': it escape \n and mess up formating
    # ue = unicode(e.encode(\'string_escape\'))
    ue = e.decode(\'utf-8\')
else:
    ue = e

  



 

分类:

技术点:

相关文章:

  • 2021-11-01
  • 2021-04-15
  • 2021-06-23
  • 2021-07-02
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2021-12-02
  • 2021-09-11
  • 2022-02-10
  • 2021-11-11
  • 2021-08-12
相关资源
相似解决方案