asmeurer
asmeurer

Reputation: 91450

Make pytest ignore pytest.ini

Does pytest have a command line flag to make it ignore the pytest.ini file? I see the --noconftest flag to disable conftest.py, but pytest --help doesn't seem to have anything for disabling pytest.ini.

Upvotes: 6

Views: 2807

Answers (1)

hoefling
hoefling

Reputation: 66171

AFAIK right now pytest doesn't offer a command line option to ignore the configuration completely. As a workaround, you can either rename pytest.ini or pass the null device as config source:

$ pytest -c /dev/null

(or

$ pytest -c NUL

on Windows).

Upvotes: 7

Related Questions