pytest问题笔记一:mark 警告 PytestUnknownMarkWarning: Unknown pytest.mark.

℡╲_俬逩灬. 提交于 2020-03-08 10:36:08

运行用例的时候,老是弹出警告

 PytestUnknownMarkWarning: Unknown pytest.mark.run_these_pl
ease - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    warnings.warn(

-- Docs: https://docs.pytest.org/en/latest/warnings.html
================================================================== 1 warning in 0.28s ==================================================================

尝试了其他博主的三种方式(https://www.cnblogs.com/zzllovehappy/p/11270933.html),只有以下方法生效了,以此记录

新增一个配置ini文件,并在文件中输入:

[pytest]

markers = run_these_please  #标记名称

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!