Skip to content

Commit af2c153

Browse files
committed
Report lineno from doctest
This is to fix pytest-sugar#122 issue.
1 parent 1cf8266 commit af2c153

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎_pytest/doctest.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def repr_failure(self, excinfo):
140140
return super(DoctestItem, self).repr_failure(excinfo)
141141

142142
def reportinfo(self):
143-
return self.fspath, None, "[doctest] %s" % self.name
143+
return self.fspath, self.dtest.lineno, "[doctest] %s" % self.name
144144

145145

146146
def _get_flag_lookup():

0 commit comments

Comments
 (0)