There is no command line option for pytest to ignore a specific directory pattern.
For example:
-- code.py
-- tests
---- test_code.py
---- integration
------ test_code_integration.py
I would like to disable all integration tests.
The argument --ignore=integration does not work.
I have also tried -k="not integration" which works, but for some reason is ignored when executing pytest via pytest.main.
Note: Of couse I could specify the full path using the --ignore argument, but the actual project is much more complex and contains many tests and integration folders.
There is no command line option for pytest to ignore a specific directory pattern.
For example:
I would like to disable all integration tests.
The argument
--ignore=integrationdoes not work.I have also tried
-k="not integration"which works, but for some reason is ignored when executing pytest viapytest.main.Note: Of couse I could specify the full path using the
--ignoreargument, but the actual project is much more complex and contains manytestsandintegrationfolders.