From 11c65f40fcc664639380a810df98a2eecf69211c Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 27 Oct 2026 10:14:56 +0100 Subject: [PATCH] chore: align card depth test and document page --- tests/test_install_tui.py | 16 +++++++++++----- wiki/tools.md | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/test_install_tui.py b/tests/test_install_tui.py index 77bd03119..c545a0d29 100644 --- a/tests/test_install_tui.py +++ b/tests/test_install_tui.py @@ -6844,13 +6844,19 @@ class EdgesTheMutantsFound(unittest.TestCase): make_card(root / "card", system) return root / "card" - def test_a_card_is_looked_for_three_folders_up_and_no_further(self): + def test_a_card_is_looked_for_up_to_the_mount_point_and_no_further(self): card = self.card("KNULLI") setup = install.card_setup("KNULLI", "knulli") - with mock.patch.object(install, "_mounted_cards", return_value=[]): - self.assertEqual(install._card_above(setup, card / "a" / "b" / "c"), - ("own", "KNULLI", card)) - self.assertIsNone(install._card_above(setup, card / "a" / "b" / "c" / "d")) + deep = card / "a" / "b" / "c" / "d" + with mock.patch.object(install, "_mounted_cards", return_value=[]), \ + mock.patch.object(install, "_mount_points", return_value=frozenset()), \ + mock.patch.object(install.os.path, "ismount", return_value=False): + self.assertEqual(install._card_above(setup, deep), ("own", "KNULLI", card)) + mounted = frozenset({str(card / "a")}) + with mock.patch.object(install, "_mounted_cards", return_value=[]), \ + mock.patch.object(install, "_mount_points", return_value=mounted), \ + mock.patch.object(install.os.path, "ismount", return_value=False): + self.assertIsNone(install._card_above(setup, deep)) def test_a_minui_root_is_looked_for_two_folders_up_and_no_further(self): card = self.card("MinUI") diff --git a/wiki/tools.md b/wiki/tools.md index 9a3678f37..456dfc205 100644 --- a/wiki/tools.md +++ b/wiki/tools.md @@ -828,6 +828,7 @@ it after a shallow fetch of the pinned commit. | `validate_pr.py` | Validate BIOS files in pull requests, post markdown report | | `validate_schemas.py` | Validate the data contracts: schemas and semantic invariants. `--source-only` checks `emulators/` and `platforms/` alone, which is what PR validation runs | | `generate_event_schema.py` | Write `schemas/install-events.schema.json` from `EVENT_KEYS` in `install.py` (`--check` exits 1 when the file is stale, which `validate_schemas.py` also reports) | +| `generate_installer_doc.py` | Rewrite the generated tables of `wiki/installer.md` (options, events, exit codes, keys per route) from `install.py` (`--check` exits 1 when a table is stale, `--page FILE` writes another copy of the page) | | `auto_fetch.py` | Fetch missing BIOS files from known sources (4-step pipeline). A download is accepted only when every cryptographic hash the entry declares (sha256, sha1, md5) matches. crc32 and size find a file the database already holds, never accept a download. An entry with no cryptographic hash is reported and not searched | | `list_platforms.py` | List active platforms (`--include-archived` adds the archived ones, used by CI) | | `download.py` | Download a pack from GitHub releases, every part checked (Python, stdlib only) |