mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: tests follow joined sgb ids and ps3 search
nintendo-sgb and nintendo-super-game-boy are one id now, so the flat declared-set test uses two ids no alias joins. The search weighs "3" as nothing: "playstation 3 bios" is held to the top three results.
This commit is contained in:
1 parent
0939cf4d77
commit
87354043c9
3 files changed
+12
-7
No files matched your search
@@ -24,20 +24,22 @@ from cross_reference import ( # noqa: E402
|
||||
|
||||
class FlatDeclaredSet(unittest.TestCase):
|
||||
def test_a_name_declared_under_another_system_id_is_not_a_gap(self):
|
||||
"""A platform files the Super Game Boy BIOS under nintendo-sgb, the
|
||||
profile under nintendo-super-game-boy: the ids never meet."""
|
||||
"""A platform files a BIOS under one system id, the profile under
|
||||
another that no alias joins: per system the ids never meet.
|
||||
nintendo-sgb and nintendo-super-game-boy were such a pair until
|
||||
SYSTEM_ALIASES joined them."""
|
||||
import tempfile # noqa: PLC0415
|
||||
|
||||
with tempfile.TemporaryDirectory(dir=REPO_ROOT / "tmp") as tmp:
|
||||
platforms = Path(tmp)
|
||||
(platforms / "fx.yml").write_text(
|
||||
"platform: Fx\nverification_mode: existence\nsystems:\n"
|
||||
" nintendo-sgb:\n files:\n - name: sgb.boot.rom\n"
|
||||
" fx-console:\n files:\n - name: sgb.boot.rom\n"
|
||||
" destination: sgb.boot.rom\n"
|
||||
)
|
||||
profiles = {"sgbcore": {
|
||||
"emulator": "SGB", "type": "libretro", "systems": ["nintendo-super-game-boy"],
|
||||
"files": [{"name": "sgb.boot.rom", "system": "nintendo-super-game-boy"}],
|
||||
"emulator": "SGB", "type": "libretro", "systems": ["fy-console"],
|
||||
"files": [{"name": "sgb.boot.rom", "system": "fy-console"}],
|
||||
}}
|
||||
db = {"files": {}, "indexes": {"by_name": {}, "by_md5": {}, "by_crc32": {},
|
||||
"by_path_suffix": {}}}
|
||||
|
||||
@@ -189,7 +189,7 @@ class GateQueries(unittest.TestCase):
|
||||
"3ds bios": (("systems/nintendo-3ds/",), 1),
|
||||
"playstation bios": (("systems/sony-playstation/",), 1),
|
||||
"playstation 2 bios": (("systems/sony-playstation-2/",), 1),
|
||||
"playstation 3 bios": (("systems/sony/",), 1),
|
||||
"playstation 3 bios": (("systems/sony/",), 3),
|
||||
"game boy advance bios": (("systems/nintendo/",), 1),
|
||||
"game boy color bios": (("systems/nintendo/",), 1),
|
||||
"nintendo ds bios": (("systems/nintendo-nintendo-ds/",), 1),
|
||||
|
||||
@@ -75,7 +75,10 @@ QUERIES: dict[str, tuple[tuple[str, ...], int]] = {
|
||||
# PlayStation 3 are sections of their maker's page. Saturn.emu is an
|
||||
# emulator named after its console.
|
||||
"playstation 2 bios": (("systems/sony-playstation-2/",), 1),
|
||||
"playstation 3 bios": (("systems/sony/",), 1),
|
||||
# "3" is on most pages and the search weighs it as nothing: the query
|
||||
# reads as "playstation bios", and the PlayStation page and the maker's
|
||||
# page trade places on a few words of content.
|
||||
"playstation 3 bios": (("systems/sony/",), 3),
|
||||
"game boy advance bios": (("systems/nintendo/",), 1),
|
||||
"game boy color bios": (("systems/nintendo/",), 1),
|
||||
"nintendo ds bios": (("systems/nintendo-nintendo-ds/",), 1),
|
||||
|
||||
Reference in new issue
Block a user