From de66807bf3b5e27f8ade327e3c0a591faa64cad2 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 20 Oct 2026 01:25:36 +0200 Subject: [PATCH] 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. --- tests/test_export_counts.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_export_counts.py b/tests/test_export_counts.py index 5163cbe3..8b6f388a 100644 --- a/tests/test_export_counts.py +++ b/tests/test_export_counts.py @@ -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()