Author jonash
Recipients jonash
Date 2017-11-18.18:18:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511029085.88.0.213398074469.issue32071@psf.upfronthosting.co.za>
In-reply-to
Content
Just to be clear, the current implementation is limited to substring matches. It doesn't support py.test like "and/or" combinators. (Actually, py.test uses 'eval' to support arbitrary patterns.)

So say we have test case

SomeClass
    test_foo
    test_bar

Then

- python -m unittest -k fo matches "test_foo"
- python -m unittest -k Some matches "test_foo" and "test_bar"
- python -m unittest -k some matches nothing

The -k option may be used multiple times, combining the patterns with "or":

- python -m unittest -k fo -k b matches "test_foo" and "test_bar"

It's also possible to use glob-style patterns, like -k "spam_*_eggs".
History
Date User Action Args
2017-11-18 18:18:05jonashsetrecipients: + jonash
2017-11-18 18:18:05jonashsetmessageid: <1511029085.88.0.213398074469.issue32071@psf.upfronthosting.co.za>
2017-11-18 18:18:05jonashlinkissue32071 messages
2017-11-18 18:18:05jonashcreate