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,10 +162,9 @@ def show_xfailed(terminalreporter):
xfailed = tr.stats.get("xfailed")
if xfailed:
if not tr.hasopt('xfailed'):
if tr.config.getvalue("verbose"):
tr.write_line(
"%d expected failures, use --report=xfailed for more info" %
len(xfailed))
tr.write_line(
"%d expected failures, use --report=xfailed for more info" %
len(xfailed))
return
tr.write_sep("_", "expected failures")
for rep in xfailed:
@ -220,10 +219,9 @@ def show_skipped(terminalreporter):
skipped = tr.stats.get('skipped', [])
if skipped:
if not tr.hasopt('skipped'):
if tr.config.getvalue("verbose"):
tr.write_line(
"%d skipped tests, use --report=skipped for more info" %
len(skipped))
tr.write_line(
"%d skipped tests, use --report=skipped for more info" %
len(skipped))
return
fskips = folded_skips(skipped)
if fskips:

View File

@ -15,7 +15,7 @@ def pytest_addoption(parser):
help="show locals in tracebacks (disabled by default).")
group.addoption('--report',
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",
action="store", dest="tbstyle", default='long',
type="choice", choices=['long', 'short', 'no'],