]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-132143: Fix the `AssertionError` in the test case `test.test_sys.TestRemoteExec...
authorlittlebutt's workshop <luogan199686@gmail.com>
Mon, 5 May 2025 16:08:49 +0000 (00:08 +0800)
committerGitHub <noreply@github.com>
Mon, 5 May 2025 16:08:49 +0000 (17:08 +0100)
Lib/test/test_sys.py

index b3dba9dad006ab5b7c7adf95a44fa7710c3d98b8..5f7171d02c5602bf527ac7cc00a52a0d34e4c393 100644 (file)
@@ -2101,7 +2101,7 @@ print("Remote script executed successfully!")
         prologue = '''\
 import sys
 def audit_hook(event, arg):
-    print(f"Audit event: {event}, arg: {arg}")
+    print(f"Audit event: {event}, arg: {arg}".encode("ascii", errors="replace"))
 sys.addaudithook(audit_hook)
 '''
         script = '''