修改python路径\Lib\site-packages\pytest_html内的html_report.py
(本机有点特殊,需要修改pycharm下的\Lib\site-packages\pytest_html内的html_report.py)
head = html.head(html.meta(charset=“utf-8”), html.title(self.title), html_css)
改为:
head = html.head(html.meta(charset=“GBK”), html.title(self.title), html_css)