From 81082ed3d37044dd4a4ac5d25eef16beb47689b7 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sat, 22 Sep 2012 11:44:56 +0200 Subject: [PATCH] extend --help to tell about --markers and --funcargs --- _pytest/helpconfig.py | 2 ++ testing/test_helpconfig.py | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/_pytest/helpconfig.py b/_pytest/helpconfig.py index 29a3f5b2e..c3f912b5a 100644 --- a/_pytest/helpconfig.py +++ b/_pytest/helpconfig.py @@ -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:") diff --git a/testing/test_helpconfig.py b/testing/test_helpconfig.py index 958f4f023..d2e660366 100644 --- a/testing/test_helpconfig.py +++ b/testing/test_helpconfig.py @@ -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: