be a bit more helpful by default regarding --report settings
--HG-- branch : trunk
This commit is contained in:
parent
0060869e79
commit
d1dcf0fa92
|
@ -162,10 +162,9 @@ 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))
|
|
||||||
return
|
return
|
||||||
tr.write_sep("_", "expected failures")
|
tr.write_sep("_", "expected failures")
|
||||||
for rep in xfailed:
|
for rep in xfailed:
|
||||||
|
@ -220,10 +219,9 @@ 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))
|
|
||||||
return
|
return
|
||||||
fskips = folded_skips(skipped)
|
fskips = folded_skips(skipped)
|
||||||
if fskips:
|
if fskips:
|
||||||
|
|
|
@ -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'],
|
||||||
|
|
Loading…
Reference in New Issue