diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2020-05-05 19:20:34 -0300 |
---|---|---|
committer | Bruno Oliveira <nicoddemus@gmail.com> | 2020-05-05 19:22:39 -0300 |
commit | d0022b5a13276f1e2fbcfc51a615b41147bf81c2 (patch) | |
tree | 99dfa96a6e8800186b6c5a452310d2db0d3d26a0 /src/_pytest/_io | |
parent | 4787fd64a4ca0dba5528b5651bddd254102fe9f3 (diff) | |
download | pytest-d0022b5a13276f1e2fbcfc51a615b41147bf81c2.tar.gz |
'saferepr' handles classes with broken __getattribute__
Fix #7145
Diffstat (limited to 'src/_pytest/_io')
-rw-r--r-- | src/_pytest/_io/saferepr.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/_pytest/_io/saferepr.py b/src/_pytest/_io/saferepr.py index 23af4d0bb..47a00de60 100644 --- a/src/_pytest/_io/saferepr.py +++ b/src/_pytest/_io/saferepr.py @@ -20,7 +20,7 @@ def _format_repr_exception(exc: BaseException, obj: Any) -> str: except BaseException as exc: exc_info = "unpresentable exception ({})".format(_try_repr_or_str(exc)) return "<[{} raised in repr()] {} object at 0x{:x}>".format( - exc_info, obj.__class__.__name__, id(obj) + exc_info, type(obj).__name__, id(obj) ) |