This commit is contained in:
Sorin Sbarnea 2024-06-26 08:59:07 +02:00 committed by GitHub
commit 87c1df3de1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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: