fix: let the parity test pass a complete system

The system pack parity test guarded against an empty parse by
requiring files to stay missing, so it would fail once the MSX and
Neo Geo gaps are collected. It now requires both reports to have run
and the pack's own missing count to match the lines it parsed.
This commit is contained in:
Abdessamad Derraz committed 2026-10-18 05:24:10 +02:00
1 parent d3dd045c04
commit d0312428e4
1 file changed
+7 -1
+7 -1
View File
@@ -57,7 +57,13 @@ class SystemPackMatchesVerify(unittest.TestCase):
if d["status"] == "missing" and not d.get("unsourceable")
})
verify_missing = sorted(name for _dest, name in verify_missing)
self.assertTrue(pack_missing or verify_missing)
# Both sides reported, so an empty list is a finding and not a
# parse that matched nothing. Requiring missing files instead
# would fail the day the collection fills them.
summary = re.search(r"(\d+) files packed, (\d+) missing", packed)
self.assertIsNotNone(summary, packed[-500:])
self.assertGreater(report["total_files"], 0)
self.assertEqual(int(summary.group(2)), len(pack_missing))
self.assertEqual(pack_missing, verify_missing)