【Pytest】解决ModuleNotFoundError: No module named '_pytest.resultlog'

如题所述

第1个回答  2022-07-02
Record :

报错:ModuleNotFoundError: No module named '_pytest.resultlog' 

原因:因为安装了pytest-rerunfailures(这个插件是失败重跑插件),然后导致_pytest.resultlog该模块被删除

结果:不可以pytest-rerunfailures与 pytest 6.1.0以上的版本一起使用。

解决办法:

①升级pytest-rerunfailures版本到9.1.1

②卸载pytest-rerunfailures使用pytest-reportlog代替

③降低pytest版本到6.1.0以下

原博文地址:https://www.cnblogs.com/QiKa/p/14457269.html
相似回答
大家正在搜