mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-26 05:37:20 -05:00
fix: read composite zip md5s apart in diff_truth
Recalbox hashes a .zip by its members. diff_truth set that composite against the profile's container md5 and reported neocdz.zip and neocd.zip as mismatches. _hash_mismatch now drops it through comparable(), the rule pair_entries and the export already apply.
This commit is contained in:
1 parent
b8baf92f1d
commit
f19a8f99d3
2 files changed
+24
-2
No files matched your search
@@ -227,6 +227,25 @@ class PlatformMultiHash(unittest.TestCase):
|
||||
self.assertEqual(pair_entries(truth, list(scraped.values())), {0: 0})
|
||||
|
||||
|
||||
class ACompositeZipMd5IsNoContainerMd5(unittest.TestCase):
|
||||
"""Recalbox hashes a .zip by its members. Its neocdz.zip md5 was set
|
||||
against geolith's container md5 and reported as a mismatch the export,
|
||||
which reads the same mark, never corrects."""
|
||||
|
||||
TRUTH = {"files": [{"name": "neocdz.zip", "md5": "b31a246b69493c35194fe0bac120dc37"}]}
|
||||
|
||||
def _scraped(self, **mark):
|
||||
return {"files": [{"name": "neocdz.zip", "md5": "f39572af7584cb5b3f70ae8cc848aba2",
|
||||
**mark}]}
|
||||
|
||||
def test_a_composite_md5_contradicts_nothing(self):
|
||||
self.assertEqual(_diff_system(self.TRUTH, self._scraped(zip_digest="composite")), {})
|
||||
|
||||
def test_a_container_md5_still_does(self):
|
||||
result = _diff_system(self.TRUTH, self._scraped())
|
||||
self.assertEqual([m["name"] for m in result["hash_mismatch"]], ["neocdz.zip"])
|
||||
|
||||
|
||||
class OnlySystemDirectoryEntries(unittest.TestCase):
|
||||
"""The truth kept files read from the save, content or working directory:
|
||||
diff_truth listed Cemu's mlc01 certificates, panda3ds's seeddb.bin and
|
||||
|
||||
Reference in new issue
Block a user