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 <[email protected]>
This commit is contained in:
roboterspinneandClaude Fable 5.1 committed 2026-10-24 17:47:31 +02:00
1 parent c9b75825f3
commit 76008e99b9
1 file changed
+3 -3
+3 -3
View File
@@ -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):