diff --git a/_pytest/doctest.py b/_pytest/doctest.py index 88174cc72..cc505c8d0 100644 --- a/_pytest/doctest.py +++ b/_pytest/doctest.py @@ -140,7 +140,7 @@ class DoctestItem(pytest.Item): 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():