Merge pull request #1500 from tgoodlet/lstrip-keywordexpr

Always lstrip() keyword expression
This commit is contained in:
Bruno Oliveira 2016-04-01 17:48:58 -03:00
commit 5af5ba11d3
2 changed files with 6 additions and 1 deletions

View File

@ -58,7 +58,7 @@ pytest_cmdline_main.tryfirst = True
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

View File

@ -670,6 +670,11 @@ class TestDurations:
"*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 = """