Skip to content

feature request: Add something like --exclude-tag in addition to --tag #202

@stianlagstad

Description

@stianlagstad

Hi! Thanks again for this package 💯

I am aware that the -k and -m pytest flags are not supported, for good historical reasons (ref #155). However, would it be possible to add a simpler version of this in pytest-workflow? We have separated our test cases into "slow" and "fast", and we wish to run only the fast ones in pull request builds, and only the slow ones on builds on our main branch. This works, but it requires us to be disciplined about ONLY adding EITHER the tag "slow" OR the tag "fast" to our test cases. We can do that, but it's easy to forget to add a tag, and then the new test case without a tag would never run. What I would instead like to do is to run something like pytest tests --exclude-tag slow on pull request builds, because then we would only need to tag the slow tests with "slow" and we could leave all other tests untagged. This would also help the case where we need more tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions