slightly improve -k help string

cosmetic change to test_nose.py
This commit is contained in:
holger krekel 2013-04-16 09:04:05 +02:00
parent 94aa76fec0
commit bb6f3ebd31
2 changed files with 6 additions and 4 deletions

View File

@ -7,8 +7,8 @@ def pytest_namespace():
def pytest_addoption(parser):
group = parser.getgroup("general")
group._addoption('-k',
action="store", dest="keyword", default='', metavar="KEYWORDEXPR",
help="only run tests which match the given expression. "
action="store", dest="keyword", default='', metavar="EXPRESSION",
help="only run tests which match the given substring expression. "
"An expression is a python evaluatable expression "
"where all names are substring-matched against test names "
"and keywords. Example: -k 'test_method or test_other' "

View File

@ -304,8 +304,9 @@ def test_apiwrapper_problem_issue260(testdir):
result = testdir.runpytest()
result.stdout.fnmatch_lines("*1 passed*")
@pytest.mark.skipif("sys.version_info < (2,6)")
def test_setup_teardown_linking_issue265(testdir):
# we accidnetially didnt integrate nose setupstate with normal setupstate
# we accidentally didnt integrate nose setupstate with normal setupstate
# this test ensures that won't happen again
testdir.makepyfile('''
import pytest
@ -314,7 +315,8 @@ def test_setup_teardown_linking_issue265(testdir):
def test_nothing(self):
"""Tests the API of the implementation (for generic and specialized)."""
@pytest.mark.skipif("True", reason="Skip tests to check if teardown is skipped as well.")
@pytest.mark.skipif("True", reason=
"Skip tests to check if teardown is skipped as well.")
class TestSkipTeardown(TestGeneric):
def setup(self):