fix issue380 by making --resultlog only rely on longrepr instead

of the "reprcrash" attribute which only exists sometimes.
This commit is contained in:
holger krekel
2013-11-19 14:19:29 +01:00
parent 82846777a7
commit 31576fac61
3 changed files with 25 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ import py
def pytest_addoption(parser):
group = parser.getgroup("terminal reporting", "resultlog plugin options")
group.addoption('--resultlog', '--result-log', action="store",
group.addoption('--resultlog', '--result-log', action="store",
metavar="path", default=None,
help="path for machine-readable result log.")
@@ -85,7 +85,7 @@ class ResultLog(object):
if not report.passed:
if report.failed:
code = "F"
longrepr = str(report.longrepr.reprcrash)
longrepr = str(report.longrepr)
else:
assert report.skipped
code = "S"