Skip to content

Commit 6799a47

Browse files
committed
Start FixtureLookupErrorRepr with an 'E'
1 parent 38e0e08 commit 6799a47

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

_pytest/python.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,8 +1835,13 @@ def toterminal(self, tw):
18351835
#tw.line("FixtureLookupError: %s" %(self.argname), red=True)
18361836
for tbline in self.tblines:
18371837
tw.line(tbline.rstrip())
1838-
for line in self.errorstring.split("\n"):
1839-
tw.line(" " + line.strip(), red=True)
1838+
lines = self.errorstring.split("\n")
1839+
for line in lines:
1840+
if line == lines[0]:
1841+
prefix = 'E '
1842+
else:
1843+
prefix = ' '
1844+
tw.line(prefix + line.strip(), red=True)
18401845
tw.line()
18411846
tw.line("%s:%d" % (self.filename, self.firstlineno+1))
18421847

0 commit comments

Comments
 (0)