mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 18:47:53 -06:00
fix: pair gaps rows with the entry they score
This commit is contained in:
1 parent
a9d8e571c1
commit
a119efc149
4 files changed
+49
-31
No files matched your search
@@ -5589,12 +5589,27 @@ class GapsPageCountsOneWay(unittest.TestCase):
|
||||
"`bios/quasi88/N88_KNJ1.ROM` |", text)
|
||||
|
||||
def test_the_destination_is_the_list_entrys(self):
|
||||
from scripts.sitegen.gaps import _declared_destination
|
||||
"""AmberELEC declares hardwareconfig.xml under eighteen MSX folders:
|
||||
each missing one is shown under its own, not under the first."""
|
||||
from scripts.sitegen.gaps import _verify_tally
|
||||
from model.platforms import load_platform_config
|
||||
|
||||
config = load_platform_config("amberelec", str(ROOT / "platforms"))
|
||||
detail = {"name": "N88_KNJ1.ROM", "system": "nec-pc-88"}
|
||||
self.assertEqual(_declared_destination(config, detail), "bios/quasi88/N88_KNJ1.ROM")
|
||||
details, wanted = [], []
|
||||
for system, data in (config.get("systems") or {}).items():
|
||||
for entry in data.get("files") or []:
|
||||
missing = entry["name"] in ("hardwareconfig.xml", "N88_KNJ1.ROM")
|
||||
details.append({"name": entry["name"], "system": system,
|
||||
"status": "missing" if missing else "ok"})
|
||||
if missing:
|
||||
wanted.append(str(entry.get("destination") or entry["name"]))
|
||||
coverage = {"platform": "AmberELEC", "config": config, "details": details,
|
||||
"verified": 0, "untested": 0, "missing": len(wanted), "total": len(details)}
|
||||
tally = _verify_tally({"amberelec": coverage})
|
||||
shown = [p["destination"] for p in tally.problems]
|
||||
self.assertEqual(shown, wanted)
|
||||
self.assertGreater(len(set(shown)), 2)
|
||||
self.assertIn("bios/quasi88/N88_KNJ1.ROM", shown)
|
||||
|
||||
def test_verify_marks_the_settled_entry(self):
|
||||
from packs import coverage as packs_coverage
|
||||
|
||||
@@ -55,13 +55,11 @@ class AnUntestedRowNamesBothHashes(unittest.TestCase):
|
||||
|
||||
path = "bios/Nintendo/Nintendo DS/dsifirmware.bin"
|
||||
declared, held = "1" * 64, "2" * 64
|
||||
config = {"systems": {"nintendo-ds": {"files": [
|
||||
{"name": "dsifirmware.bin", "sha256": declared}]}}}
|
||||
detail = {"name": "dsifirmware.bin", "system": "nintendo-ds"}
|
||||
entry = {"name": "dsifirmware.bin", "sha256": declared}
|
||||
problem = {
|
||||
"platform": "RetroDECK", "name": "dsifirmware.bin", "status": "untested",
|
||||
"required": True, "reason": "declared hash contradicted by the local file",
|
||||
"declared": gaps._declared_hashes(config, detail), "path": path,
|
||||
"declared": gaps._declared_hashes(entry), "path": path,
|
||||
}
|
||||
db = {"files": {"f" * 40: {"path": path, "sha256": held}}}
|
||||
table = "\n".join(gaps._render_problem_files([problem], db=db))
|
||||
|
||||
Reference in new issue
Block a user