Skip to content

Commit

Permalink
Report lineno from doctest
Browse files Browse the repository at this point in the history
This is to fix pytest-sugar#122 issue.
  • Loading branch information
hongquan committed Jul 24, 2017
1 parent 1cf8266 commit af2c153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _pytest/doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def repr_failure(self, excinfo):
return super(DoctestItem, self).repr_failure(excinfo)

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


def _get_flag_lookup():
Expand Down

0 comments on commit af2c153

Please sign in to comment.