pytest.outcomes.XFailed: [NOTRUN] yield tests were removed in pytest 4.0 - test1 will be ignored
或者报错:
PytestUnknownMarkWarning: Unknown pytest.mark.tiaoshi - is this a typo?问题分析:
所安装的pytest版本已经废弃了代码中使用的yield 方法
解决方案:卸载高版本
安装低版本
去官网找到对应版本的pytest版本包,
https://pypi.org/project/pytest/3.10.0/
使用命令去安装 pip install pytest==3.10.0
再去执行,可看到对应的包版本已经更新


![pytest执行报错:pytest.outcomes.XFailed: [NOTRUN] yield tests were removed in pytest 4.0 - test1 will be pytest执行报错:pytest.outcomes.XFailed: [NOTRUN] yield tests were removed in pytest 4.0 - test1 will be](http://www.mshxw.com/aiimages/31/923413.png)
