fix: test that a removed size is reported

Locks the counter added for neocdz.zip: the platform's size with no truth size is a removal the summary names.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 01:25:36 +02:00
1 parent 52b2970e1c
commit de66807bf3
1 file changed
+15
+15
View File
@@ -870,5 +870,20 @@ class BatoceraEntriesParseAsWritten(unittest.TestCase):
self.assertNotIn("exec(", source)
class ARemovedSizeIsReported(unittest.TestCase):
"""System.dat's neocdz.zip went out without size 953078 when the truth
took the entry over with no size: no counter named the removal."""
def test_the_removal_is_counted(self):
from export_native import landed_changes
from exporter.systemdat_exporter import Exporter as SystemDat
fe = NativeFile("neocdz.zip", "neocdz.zip", "SNK - NeoGeo CD",
platform={"md5": A, "size": 953078}, truth={"md5": B})
changes = landed_changes(SystemDat(), {"SNK - NeoGeo CD": NativeSystem(
"SNK - NeoGeo CD", files=[fe])})
self.assertEqual(changes.unsized, ["SNK - NeoGeo CD/neocdz.zip"])
if __name__ == "__main__":
unittest.main()