Revert change to traceback repr (#7535)
* Revert change to traceback repr * Add test and changelog entry * Restore *exact* prev output Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7ec6401ffa
commit
3a060b77e8
@@ -262,7 +262,15 @@ class TracebackEntry:
|
||||
raise
|
||||
except BaseException:
|
||||
line = "???"
|
||||
return " File %r:%d in %s\n %s\n" % (self.path, self.lineno + 1, name, line)
|
||||
# This output does not quite match Python's repr for traceback entries,
|
||||
# but changing it to do so would break certain plugins. See
|
||||
# https://github.com/pytest-dev/pytest/pull/7535/ for details.
|
||||
return " File %r:%d in %s\n %s\n" % (
|
||||
str(self.path),
|
||||
self.lineno + 1,
|
||||
name,
|
||||
line,
|
||||
)
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user