Add example of -k 'not test' in help text

This commit is contained in:
Xuan Luong 2017-09-30 18:36:09 -04:00
parent 966391c77e
commit 7093d8f65e
2 changed files with 3 additions and 1 deletions

View File

@ -91,7 +91,8 @@ def pytest_addoption(parser):
"where all names are substring-matched against test names " "where all names are substring-matched against test names "
"and their parent classes. Example: -k 'test_method or test_" "and their parent classes. Example: -k 'test_method or test_"
"other' matches all test functions and classes whose name " "other' matches all test functions and classes whose name "
"contains 'test_method' or 'test_other'. " "contains 'test_method' or 'test_other', while -k 'not test_method' "
"matches those that don't contain 'test_method' in their names. "
"Additionally keywords are matched to classes and functions " "Additionally keywords are matched to classes and functions "
"containing extra names in their 'extra_keyword_matches' set, " "containing extra names in their 'extra_keyword_matches' set, "
"as well as functions which have names assigned directly to them." "as well as functions which have names assigned directly to them."

1
changelog/1442.doc Normal file
View File

@ -0,0 +1 @@
In help text of ``-k`` option, add example of using ``not`` to not select certain tests whose names match the provided expression.