From 700d6b4cbda0c45ae142cde40bce1cbedac2d7bc Mon Sep 17 00:00:00 2001 From: Luna Date: Tue, 24 Nov 2026 15:54:35 +0100 Subject: [PATCH] tests: guest scene launch-failure test tolerates a localized OS error on stdout (TEST-GUEST-SCENE-LOCALE) On a non-English Windows the WinError text reaches stdout in the ANSI code page; strict UTF-8 decoding left result.stdout as None and the test died with a TypeError. Co-Authored-By: Claude Opus 5.5 --- tests/test_guest_scene_reference.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_guest_scene_reference.py b/tests/test_guest_scene_reference.py index 3c0ed16dd7..e54109261f 100644 --- a/tests/test_guest_scene_reference.py +++ b/tests/test_guest_scene_reference.py @@ -112,7 +112,8 @@ 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) + # A localized OS error (WinError 216 on a German Windows) reaches stdout in the ANSI code page, not UTF-8. + 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"])