Add __repr__ for RunResult

This commit is contained in:
Daniel Hahler
2019-01-18 17:35:49 +01:00
parent a131cd6c3b
commit 9bcbf552d6
2 changed files with 17 additions and 0 deletions

View File

@@ -398,6 +398,12 @@ class RunResult(object):
self.stderr = LineMatcher(errlines)
self.duration = duration
def __repr__(self):
return (
"<RunResult ret=%r len(stdout.lines)=%d len(stderr.lines)=%d duration=%.2fs>"
% (self.ret, len(self.stdout.lines), len(self.stderr.lines), self.duration)
)
def parseoutcomes(self):
"""Return a dictionary of outcomestring->num from parsing the terminal
output that the test process produced.