From ae5552277be9582063679ec05aee639c5f78b2bd Mon Sep 17 00:00:00 2001 From: a-smo <295049876+syntaxixr@users.noreply.github.com> Date: Wed, 25 Nov 2026 01:04:06 +0700 Subject: [PATCH] tests/test_guest_scene_reference: decode the launch-failure output with errors=replace (TEST-GUEST-SCENE-LOCALE) On a non-English Windows the runner's launch error carries the OS message in the ANSI code page (cp1251 on Russian Windows 10), so strict UTF-8 decoding raised UnicodeDecodeError before any assertion. The test above it already decodes with errors=replace. --- tests/test_guest_scene_reference.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_guest_scene_reference.py b/tests/test_guest_scene_reference.py index 3c0ed16dd7..8f291d6e4f 100644 --- a/tests/test_guest_scene_reference.py +++ b/tests/test_guest_scene_reference.py @@ -112,7 +112,9 @@ def test_launch_failure_preserves_run_record_and_logs(self): "--shaders", str(root), "--out", str(out)] if sys.platform != "win32": cmd += ["--wine", str(bad_loader), "--wine-arg=-a", "--wine-arg=path with spaces/wine"] - result = subprocess.run(cmd, capture_output=True, encoding="utf-8", timeout=20) + # The launch error carries the OS message in the console's ANSI code page on a non-English Windows + # (cp1251 on Russian Windows 10), so the output is decoded as the test above does it. + result = subprocess.run(cmd, capture_output=True, encoding="utf-8", errors="replace", timeout=20) self.assertEqual(result.returncode, 1, result.stdout + result.stderr) report = json.loads((out / "report.json").read_text(encoding="utf-8")) self.assertIn("could not launch", report["error"])