Skip to content

Commit

Permalink
Merge pull request #1500 from tgoodlet/lstrip-keywordexpr
Browse files Browse the repository at this point in the history
Always lstrip() keyword expression
  • Loading branch information
nicoddemus committed Apr 1, 2016
2 parents 56156bb + 053c052 commit 5af5ba1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _pytest/mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def pytest_cmdline_main(config):


def pytest_collection_modifyitems(items, config):
keywordexpr = config.option.keyword
keywordexpr = config.option.keyword.lstrip()
matchexpr = config.option.markexpr
if not keywordexpr and not matchexpr:
return
Expand Down
5 changes: 5 additions & 0 deletions testing/acceptance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,11 @@ def test_with_failing_collection(self, testdir):
"*call*test_1*",
])

def test_with_not(self, testdir):
testdir.makepyfile(self.source)
result = testdir.runpytest("-k not 1")
assert result.ret == 0


class TestDurationWithFixture:
source = """
Expand Down

0 comments on commit 5af5ba1

Please sign in to comment.