be a bit more helpful by default regarding --report settings

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-11-20 09:11:04 +01:00
parent 0060869e79
commit d1dcf0fa92
2 changed files with 7 additions and 9 deletions

View File

@ -162,7 +162,6 @@ def show_xfailed(terminalreporter):
xfailed = tr.stats.get("xfailed") xfailed = tr.stats.get("xfailed")
if xfailed: if xfailed:
if not tr.hasopt('xfailed'): if not tr.hasopt('xfailed'):
if tr.config.getvalue("verbose"):
tr.write_line( tr.write_line(
"%d expected failures, use --report=xfailed for more info" % "%d expected failures, use --report=xfailed for more info" %
len(xfailed)) len(xfailed))
@ -220,7 +219,6 @@ def show_skipped(terminalreporter):
skipped = tr.stats.get('skipped', []) skipped = tr.stats.get('skipped', [])
if skipped: if skipped:
if not tr.hasopt('skipped'): if not tr.hasopt('skipped'):
if tr.config.getvalue("verbose"):
tr.write_line( tr.write_line(
"%d skipped tests, use --report=skipped for more info" % "%d skipped tests, use --report=skipped for more info" %
len(skipped)) len(skipped))

View File

@ -15,7 +15,7 @@ def pytest_addoption(parser):
help="show locals in tracebacks (disabled by default).") help="show locals in tracebacks (disabled by default).")
group.addoption('--report', group.addoption('--report',
action="store", dest="report", default=None, metavar="opts", action="store", dest="report", default=None, metavar="opts",
help="comma separated reporting options") help="comma separated options, valid: skipped,xfailed")
group._addoption('--tb', metavar="style", group._addoption('--tb', metavar="style",
action="store", dest="tbstyle", default='long', action="store", dest="tbstyle", default='long',
type="choice", choices=['long', 'short', 'no'], type="choice", choices=['long', 'short', 'no'],