From 76008e99b9bf02bcbcbec2ed0d3c5380204cde2b Mon Sep 17 00:00:00 2001 From: roboterspinne <229981445+roboterspinne@users.noreply.github.com> Date: Sat, 24 Oct 2026 17:47:31 +0200 Subject: [PATCH] test(tools): compare quoted and resolved paths in the patch advisor test The patch advisor prints its conversion options through command_line, which quotes a path containing a space, and passes resolved paths to the relinker, so the unit test failed when the temporary directory had a space in its path or was reached through an 8.3 short name or a symlink. Build the expected text with the same helper, resolve the fixture root and give it a space so every machine exercises the quoted rendering. Co-Authored-By: Claude Fable 5.1 --- tools/tests/test_suggest_patches.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tests/test_suggest_patches.py b/tools/tests/test_suggest_patches.py index 0da25c6f5d..18f1028ee8 100644 --- a/tools/tests/test_suggest_patches.py +++ b/tools/tests/test_suggest_patches.py @@ -17,9 +17,9 @@ VERIFIED = "Verified 1 patches: 1 ok, 0 not-checked, 0 mismatch\n" class PatchAdvisorTests(unittest.TestCase): def setUp(self): - self.directory = tempfile.TemporaryDirectory() + self.directory = tempfile.TemporaryDirectory(prefix="patch advisor-") self.addCleanup(self.directory.cleanup) - self.root = Path(self.directory.name) + self.root = Path(self.directory.name).resolve() self.catalog = self.root / "catalog" self.catalog.mkdir() self.input = self.root / "eboot.bin" @@ -229,7 +229,7 @@ class PatchAdvisorTests(unittest.TestCase): self.assertIn("--patches", output.getvalue()) self.assertIn("--module-dir Media/Modules", output.getvalue()) self.assertIn("--executable picker/picker.bin", output.getvalue()) - self.assertIn(f"--sce-module-path {self.root}", output.getvalue()) + self.assertIn(suggest_patches.command_line(["--sce-module-path", str(self.root)]), output.getvalue()) @patch.object(suggest_patches.subprocess, "run") def test_no_entries_for_title_is_distinct(self, run):