PytestUnknownMarkWarning: Unknown pytest.mark.auth

运行发现

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
原文地址:https://www.cnblogs.com/nicole-zhang/p/14479350.html