]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-119070: Avoid test crash due to Unicode in stderr output (GH-119747)
authorSteve Dower <steve.dower@python.org>
Wed, 29 May 2024 20:51:30 +0000 (21:51 +0100)
committerGitHub <noreply@github.com>
Wed, 29 May 2024 20:51:30 +0000 (20:51 +0000)
Lib/test/test_launcher.py

index 7dd0b67ea0b3dc3f15630d6b095dafd226bc7012..b701ceb86406b282e429a729c5b2cc472aa72d3b 100644 (file)
@@ -232,7 +232,7 @@ class RunPyMixin:
             p.stdin.close()
             p.wait(10)
             out = p.stdout.read().decode("utf-8", "replace")
-            err = p.stderr.read().decode("ascii", "replace")
+            err = p.stderr.read().decode("ascii", "replace").replace("\uFFFD", "?")
         if p.returncode != expect_returncode and support.verbose and not allow_fail:
             print("++ COMMAND ++")
             print([self.py_exe, *args])