10000 [3.13] gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839) by miss-islington · Pull Request #134843 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.13] gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839) #134843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
  • Loading branch information
vstinner authored and miss-islington committed May 28, 2025
commit 3787bf098c80208909abbb2e15fb93f3c2d43c93
5 changes: 4 additions & 1 deletion Lib/test/test_regrtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,10 @@ def test_script_autotest(self):
self.run_tests(args)

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

@unittest.skipUnless(sysconfig.is_python_build(),
Expand Down
Loading
0