refactor: split native model and review hashes

This commit is contained in:
Abdessamad Derraz committed 2026-11-24 05:54:38 +01:00
1 parent 753e873472
commit 571a22d2b6
33 files changed
+658 -617

No files matched your search

+7 -6
View File
@@ -16,7 +16,8 @@ import unittest
from collections import OrderedDict
from pathlib import Path
from resolve.reconcile import NativeFile, NativeSystem, Report, build_native_model
from resolve.nativemodel import NativeFile, NativeSystem, Report
from resolve.reconcile import build_native_model
from exporter.bizhawk_exporter import Exporter as BizHawk
from exporter.misterfpga_exporter import Exporter as Mister
from exporter.romm_exporter import Exporter as Romm
@@ -191,7 +192,7 @@ class RetroBatKeepsWhatWeDoNotModel(unittest.TestCase):
]},
"newsys": {"name": "New", "biosFiles": [{"md5": B, "file": "bios/new.bin"}]},
}
from resolve.reconcile import Report
from resolve.nativemodel import Report
produced = json.loads(RetroBat().render(
systems, Report(), {"batocera-systems.json": json.dumps(original)},
@@ -251,7 +252,7 @@ class PureDataExportsKeepWhatWeDoNotModel(unittest.TestCase):
filled=[])
def test_recalbox(self):
from resolve.reconcile import Report
from resolve.nativemodel import Report
from exporter.recalbox_exporter import Exporter as Recalbox
fe = self._file("a.bin", "nes", destination="nes/a.bin", core="libretro:fceumm")
@@ -277,7 +278,7 @@ class PureDataExportsKeepWhatWeDoNotModel(unittest.TestCase):
self.assertIn('mandatory="false"', produced)
def test_system_dat(self):
from resolve.reconcile import Report
from resolve.nativemodel import Report
fe = self._file("a.bin", "Nintendo - NES")
systems = {"Nintendo - NES": NativeSystem("Nintendo - NES", files=[fe])}
@@ -301,7 +302,7 @@ class PureDataExportsKeepWhatWeDoNotModel(unittest.TestCase):
def test_two_additions_differing_by_directory_are_two_lines(self):
"""PCSX2's vulkan and opengl convert.glsl were both written under the
bare name, so the second was dropped and still counted as added."""
from resolve.reconcile import Report
from resolve.nativemodel import Report
shaders = [
NativeFile("convert.glsl", f"pcsx2/resources/shaders/{api}/convert.glsl",
@@ -989,7 +990,7 @@ class TheSummaryCountsWhatTheFileCarries(unittest.TestCase):
def test_romm_drops_the_hashes_it_counts_cleared(self):
from exporter.landed import landed_changes
from resolve.reconcile import Report
from resolve.nativemodel import Report
fe = self._contradicted()
systems = {"psx": NativeSystem("psx", files=[fe])}