-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
type: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
Description
Originally reported by: David Burns (BitBucket: AutomatedTester, GitHub: AutomatedTester)
Currently the only way to sort through tests is with the -k option. Unfortunately this also looks at the method name which can run tests you don't want/expect.
For example
#!python
@pytest.mark.staging
def test_omg_dont_run_on_prod(self):
pass
@pytest.mark.prod
def test_basics_still_work(self):
pass
py.test -k prod #Runs the tests above even though the first one is marked as staging
It would be great if we could add a -m option that only looks at the marks.
so if I did py.test -m prod only the second test would be run.
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 branch