From 243cdc64b9067e55f011bfa5c5429a67c756443e Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Thu, 4 Sep 2014 10:33:40 +0200 Subject: Trying to output the stdout/stderr but only in failure cases --- _pytest/resultlog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '_pytest') diff --git a/_pytest/resultlog.py b/_pytest/resultlog.py index 8cf58a1b67..6578cb6989 100644 --- a/_pytest/resultlog.py +++ b/_pytest/resultlog.py @@ -57,7 +57,8 @@ class ResultLog(object): _safeprint("%s %s" % (lettercode, testpath), file=self.logfile) for line in longrepr.splitlines(): _safeprint(" %s" % line, file=self.logfile) - if 0 and sections is not None: # XXX XXX USES TOO MUCH MEMORY?? + if sections is not None and ( + lettercode in ('E', 'F')): # to limit the size of logs for title, content in sections: _safeprint(" ---------- %s ----------" % (title,), file=self.logfile) -- cgit v1.2.3-65-gdbad