Merge branch 'mark_missing_fixture_error' of https://github.com/eolo999/pytest

This commit is contained in:
Bruno Oliveira
2016-07-25 18:20:17 -03:00
5 changed files with 18 additions and 5 deletions

View File

@@ -1842,8 +1842,13 @@ class FixtureLookupErrorRepr(TerminalRepr):
#tw.line("FixtureLookupError: %s" %(self.argname), red=True)
for tbline in self.tblines:
tw.line(tbline.rstrip())
for line in self.errorstring.split("\n"):
tw.line(" " + line.strip(), red=True)
lines = self.errorstring.split("\n")
for line in lines:
if line == lines[0]:
prefix = 'E '
else:
prefix = ' '
tw.line(prefix + line.strip(), red=True)
tw.line()
tw.line("%s:%d" % (self.filename, self.firstlineno+1))