自己遇到的问题 百度上搜索结果
一、生成不起报告:
1、左上角选择 Edit Configurations...
2、Python 下如果没有就点+号添加;然后在“2、”选择py文件;
3、搞定 点击运行 ;注意不是 Run “unittest in ***.py”。
二、中文乱码
需要修改 HtmlTestRunner下的result.py文件:
def generate_file(self, testRunner, report_name, report): 里面的、
with open(path_file, 'w') as report_file: 加上“encoding='utf-8'”
with open(path_file, 'w', encoding='utf-8') as report_file: