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

posted on 2021-02-27 21:29  QiKa  阅读(819)  评论(0编辑  收藏  举报