From: littlebutt's workshop Date: Mon, 5 May 2025 16:08:49 +0000 (+0800) Subject: gh-132143: Fix the `AssertionError` in the test case `test.test_sys.TestRemoteExec... X-Git-Tag: v3.14.0b1~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6078ed6d0cb8745460769bbb5dd2392c91c2f55;p=thirdparty%2FPython%2Fcpython.git gh-132143: Fix the `AssertionError` in the test case `test.test_sys.TestRemoteExec` (#132248) --- diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index b3dba9dad006..5f7171d02c56 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -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 = '''