PytestUnknownMarkWarning: Unknown pytest.mark.auth - is this a typo? You can register custom marks to avoid this warning

运行发现

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

 

解决方案

新建一个pytest.ini,输入以下内容

mask名称: mask描述(描述可省略)

[pytest]
markers =
    auth: marks tests as auth (deselect with '-m "not auth"')
多个mark可以这样
[pytest]
markers =
    auth1
    auth2

 

posted @ 2021-03-04 11:38  OTAKU_nicole  阅读(378)  评论(0编辑  收藏  举报