test: pin exact sets in the shipped content ratchets

This commit is contained in:
Abdessamad Derraz committed 2026-10-06 01:49:09 +02:00
1 parent 820ed9cff0
commit 33184102c9
1 file changed
+15 -11
+15 -11
View File
@@ -177,11 +177,12 @@ class ProfileContradictionsAreKnown(unittest.TestCase):
) )
if path and status == "hash_mismatch": if path and status == "hash_mismatch":
unsatisfied.append(f"{name}/{entry.get('name','')}") unsatisfied.append(f"{name}/{entry.get('name','')}")
self.assertLessEqual( # The exact set, not a ceiling: a ceiling of 20 over 4 known cases
len(unsatisfied), 20, # let 16 new ones through, and a swap of one case for another passed.
"profile declarations no held file satisfies grew past the known " self.assertEqual(sorted(unsatisfied), KNOWN_UNSATISFIED)
f"set ({len(unsatisfied)}):\n " + "\n ".join(sorted(unsatisfied)),
)
KNOWN_UNSATISFIED: list[str] = []
class ArchiveNamesDesignateArchives(unittest.TestCase): class ArchiveNamesDesignateArchives(unittest.TestCase):
@@ -209,12 +210,15 @@ class ArchiveNamesDesignateArchives(unittest.TestCase):
# <name>.zip, or the repo's variant form <name>.zip.<md5prefix> # <name>.zip, or the repo's variant form <name>.zip.<md5prefix>
if not re.match(r".*\.zip(\.[0-9a-f]{6,})?$", base): if not re.match(r".*\.zip(\.[0-9a-f]{6,})?$", base):
loose.append(f"{name} -> {path}") loose.append(f"{name} -> {path}")
self.assertLessEqual( # The only accepted case is ngpc.zip, whose md5 RetroDECK itself
len(loose), # declares against the loose Neo Geo Pocket Color BIOS. Counting it
1, # let d2fdc.zip take its place unnoticed.
"an archive name designates a loose file; the only accepted case is " self.assertEqual(
"ngpc.zip, whose md5 RetroDECK itself declares against the loose " sorted(loose),
f"Neo Geo Pocket Color BIOS:\n " + "\n ".join(sorted(loose)), [
"ngpc.zip -> bios/SNK/Neo Geo Pocket/"
"SNK Neo-Geo Pocket Color BIOS (1999)(SNK)(en-ja).bin"
],
) )