是否pytest有命令行标志使其忽略 pytest.ini 文件?我看到--noconftest要禁用的标志conftest.py,但pytest --help似乎没有任何可禁用的内容pytest.ini。
据我所知,现在pytest不提供命令行选项来完全忽略配置。作为解决方法,您可以重命名pytest.ini或传递空设备作为配置源:
$ pytest -c /dev/null
Run Code Online (Sandbox Code Playgroud)
(或者
$ pytest -c NUL
Run Code Online (Sandbox Code Playgroud)
在 Windows 上)。
| 归档时间: |
|
| 查看次数: |
1947 次 |
| 最近记录: |