Compare commits

...

1 Commits

Author SHA1 Message Date
Sorin Sbarnea 66a18f7199
Call correct _saferepr() in _format_assertmsg
Fixes: #6682
2024-05-14 15:59:20 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -451,7 +451,7 @@ def _format_assertmsg(obj: object) -> str:
# However in either case we want to preserve the newline.
replaces = [("\n", "\n~"), ("%", "%%")]
if not isinstance(obj, str):
obj = saferepr(obj)
obj = _saferepr(obj)
replaces.append(("\\n", "\n~"))
for r1, r2 in replaces: