Merge pull request #5111 from blueyed/deselect_by_keyword-skip

deselect_by_keyword: skip without expression
This commit is contained in:
Daniel Hahler 2019-04-17 23:20:02 +02:00 committed by GitHub
commit 1460ad6027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,9 @@ pytest_cmdline_main.tryfirst = True
def deselect_by_keyword(items, config):
keywordexpr = config.option.keyword.lstrip()
if not keywordexpr:
return
if keywordexpr.startswith("-"):
keywordexpr = "not " + keywordexpr[1:]
selectuntil = False