运行pytest报错“PytestUnknownMarkWarning: Unknown pytest.mark.file - is this a typo? ”

报错如下

 

解决方案 :

在项目的任意文件夹下创建pytest.ini文件,写入内容:

[pytest]
filterwarnings =
    ignore::UserWarning

或者

[pytest]
filterwarnings =
    error
    ignore::UserWarning

 

posted @ 2021-02-02 16:20  Wiselee😏  阅读(1115)  评论(0编辑  收藏  举报