Skip to content

Commit 5511533

Browse files
[3.13] gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839) (#134843)
gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839) Use "backslashreplace" error handler to decode stdout and stderr. Example: vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91> "C:\victor\python\main\PCbuild\amd64\python_d.exe" -m test --fast-ci --slow-ci --testdir C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3 test_regrtest_noop4 Notice the "\x91" byte at the end of the first line: it's the non-ASCII U+00E6 character encoded to the OEM cp437 code page. (cherry picked from commit 9161827) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 8e60e6c commit 5511533

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_regrtest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,10 @@ def test_script_autotest(self):
871871
self.run_tests(args)
872872

873873
def run_batch(self, *args):
874-
proc = self.run_command(args)
874+
proc = self.run_command(args,
875+
# gh-133711: cmd.exe uses the OEM code page
876+
# to display the non-ASCII current directory
877+
errors="backslashreplace")
875878
self.check_output(proc.stdout)
876879

877880
@unittest.skipUnless(sysconfig.is_python_build(),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy