记: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