相关疑难解决方法(0)

如何禁用 pytest.ini 中的多个插件?

我在同一个存储库(单独的 pytest.ini 文件)中有需要不同 pytest 插件的测试。如何在不卸载的情况下禁用 pytest.ini 中的多个插件?

https://docs.pytest.org/en/latest/plugins.html#findpluginname

addopts = --nomigrations --reuse-db -s -p no:pytest-splinter 
Run Code Online (Sandbox Code Playgroud)

工作正常,但我也想为其中一个测试套件禁用 pytest-django 和 pytest-bdd。我怎样才能做到这一点?我试过了:

addopts = --nomigrations --reuse-db -s -p no:pytest-splinter -p no:pytest-django 

addopts = --nomigrations --reuse-db -s -p no:pytest-splinter no:pytest-django 

addopts = --nomigrations --reuse-db -s -p no:pytest-splinter pytest-django 
Run Code Online (Sandbox Code Playgroud)

都失败了,并且文档没有描述这是如何完成的。任何指针都非常感谢,谢谢!

python testing pytest

5
推荐指数
1
解决办法
1230
查看次数

标签 统计

pytest ×1

python ×1

testing ×1