Skip to content

Commit

Permalink
Merge pull request #2807 from xuanluong/issue-1442-mention-not--k-help
Browse files Browse the repository at this point in the history
[doc] Add example of -k 'not test' in help text
  • Loading branch information
nicoddemus committed Oct 1, 2017
2 parents 966391c + 7093d8f commit 6690b8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _pytest/mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def pytest_addoption(parser):
"where all names are substring-matched against test names "
"and their parent classes. Example: -k 'test_method or test_"
"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 "
"containing extra names in their 'extra_keyword_matches' set, "
"as well as functions which have names assigned directly to them."
Expand Down
1 change: 1 addition & 0 deletions changelog/1442.doc
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 6690b8a

Please sign in to comment.