extend --help to tell about --markers and --funcargs

This commit is contained in:
holger krekel 2012-09-22 11:44:56 +02:00
parent 465cfff6f9
commit 81082ed3d3
2 changed files with 9 additions and 5 deletions

View File

@ -79,6 +79,8 @@ def showhelp(config):
tw.line() ; tw.line()
#tw.sep("=")
tw.line("to see available markers type: py.test --markers")
tw.line("to see available funcargs type: py.test --funcargs")
return
tw.line("conftest.py options:")

View File

@ -17,11 +17,13 @@ def test_version(testdir, pytestconfig):
def test_help(testdir):
result = testdir.runpytest("--help")
assert result.ret == 0
result.stdout.fnmatch_lines([
"*-v*verbose*",
"*setup.cfg*",
"*minversion*",
])
result.stdout.fnmatch_lines("""
*-v*verbose*
*setup.cfg*
*minversion*
*to see*markers*py.test --markers*
*to see*funcargs*py.test --funcargs*
""")
def test_collectattr():
class A: