mardi 28 août 2018

pytest disable multiple plugins in pytest.ini

I have tests within the same repository (separate pytest.ini files) that require different pytest plugins. How can I disable multiple plugins in pytest.ini without uninstalling them?

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

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

works fine, but I also want to disable pytest-django and pytest-bdd for one of the test suites. How can I do that? I've tried:

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 

all fail, and the documentation doesn't describe how this is done. Any pointers greatly appreciated, thanks!

Aucun commentaire:

Enregistrer un commentaire