Skip to content

Commit afb5221

Browse files
[3.14] gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839) (#134842)
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 7515384 commit afb5221

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
@@ -874,7 +874,10 @@ def test_script_autotest(self):
874874
self.run_tests(args)
875875

876876
def run_batch(self, *args):
877-
proc = self.run_command(args)
877+
proc = self.run_command(args,
878+
# gh-133711: cmd.exe uses the OEM code page
879+
# to display the non-ASCII current directory
880+
errors="backslashreplace")
878881
self.check_output(proc.stdout)
879882

880883
@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