Skip to content

Add ability to use globs when using --ignore #3711

@machinekoder

Description

@machinekoder

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: collectionrelated to the collection phasetype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions