-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
type: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branchtype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Description
It would be useful for my workflow to be able to ignore specific tests while still collecting an entire directory.
For example, I have:
tests/
test_a.py # contains test_foo(), test_bar()
test_b.py # contains test_baz(), test_buz()
I can currently use --ignore
to ignore an entire file, but not a specific test. If I want to run every test except for test_a.py::test_foo
I will have a very long command line.
I propose to accept test ids with --ignore
:
$ pytest tests --ignore tests/test_a.py::test_foo
$ pytest tests --ignore tests/test_a.py::test_foo[param]
Thoughts? I'd be glad to submit a PR.
jluttine, jhagege, benaryorg and soyszala
Metadata
Metadata
Assignees
Labels
type: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branchtype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature