1、在此网站下载HTMLTestRunner插件 2、下载完成后拖入python中的Lib中 3、用PyCharm打开此插件 4、把 94 import StringIO 改为 import io 5、把 539 self.outputBuffer = StringIO.StringIO() 改为 self.outputBuffer = io.StringIO() 6、把 642 if not rmap.has_key(cls): 改为 # if not rmap.has_key(cls): 在下一行加+ if not cls in rmap: 7、把 767 uo = o.decode(‘latin-1’) 改为 uo = o #.decode(‘latin-1’) 8、把 773 ue = e.decode(‘latin-1’) 改为 ue = e #.decode(‘latin-1’)