Merge pull request #5131 from blueyed/_getfailureheadline

_getfailureheadline: get head_line property only once
This commit is contained in:
Bruno Oliveira 2019-04-15 12:23:41 -03:00 committed by GitHub
commit 24bd51bda0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -734,10 +734,10 @@ class TerminalReporter(object):
return res + " "
def _getfailureheadline(self, rep):
if rep.head_line:
return rep.head_line
else:
return "test session" # XXX?
head_line = rep.head_line
if head_line:
return head_line
return "test session" # XXX?
def _getcrashline(self, rep):
try: