chore: align card depth test and document page

This commit is contained in:
Abdessamad Derraz committed 2026-10-27 10:14:56 +01:00
1 parent 102108f849
commit 11c65f40fc
2 files changed
+12 -5

No files matched your search

+11 -5
View File
@@ -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")
+1
View File
@@ -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) |