-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
topic: collectionrelated to the collection phaserelated to the collection phasetype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
Description
Looks like when we use -m more than once, only the last entry is used (on Linux/macOS, at least, haven't tested on Windows).
Ex:
pytest test_me.py -m x -m z
pytest test_me.py -m 'x or y' -m z
Both those examples will only run those tests with the mark z, b/c that's the last -m argument passed in. If we reverse the order, then the other marked tests will run.
Nowadays it's common for command line programs to take in multiple of the same arguments and they usually work in an additive way.
In this case, multiple -m usage would mean an or:
-m x -m z=-m 'x or z'-m 'x or y' -m z=-m '(x or y) or z'
If this is not possible, then fail when using -m multiple times.
My use case is that I have a bash script that adds markers depending on arguments and environment variables and took me a while to figure this out.. having early failure would have saved a lot of time.
rouge8, brandon-leapyear, nonamethanks and wimglenn
Metadata
Metadata
Assignees
Labels
topic: collectionrelated to the collection phaserelated to the collection phasetype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch