mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-29 04:48:54 -06:00
refactor: move pack library code into packs/
This commit is contained in:
1 parent
4d4052a8ab
commit
0b532366d0
167 files changed
+14476
-13882
No files matched your search
@@ -4471,9 +4471,10 @@ class DataDirectoriesAreInstalled(unittest.TestCase):
|
||||
manifest = json.loads((REPO_ROOT / "install" / "retroarch.json").read_text())
|
||||
dirs = manifest.get("data_directories") or []
|
||||
files = sum(len(d["files"]) for d in dirs)
|
||||
import generate_pack
|
||||
from packs import archive as packs_archive
|
||||
from packs import datatrees
|
||||
|
||||
written = generate_pack.PACK_DOCUMENTS + generate_pack.pack_markers(
|
||||
written = packs_archive.PACK_DOCUMENTS + datatrees.pack_markers(
|
||||
"retroarch", None, str(REPO_ROOT / "platforms"))
|
||||
self.assertEqual(written, ("README.txt", "manifest.json", ".nomedia"))
|
||||
self.assertEqual(
|
||||
@@ -7728,13 +7729,13 @@ class TheListVersionIsComparedWithTheSystems(unittest.TestCase):
|
||||
"""A handheld without network installs from the pack: its manifest.json
|
||||
records the list's version, which generate_pack takes from the
|
||||
install list built with the same choices."""
|
||||
import generate_pack
|
||||
from packs import scope
|
||||
data = b"bios"
|
||||
install_list = {"version": "43.1", "files": [
|
||||
{"dest": "a.bin", "sha1": hashlib.sha1(data).hexdigest(), "size": 4}]}
|
||||
pack_list = {"files": [{"path": "a.bin", "sha1": hashlib.sha1(data).hexdigest(),
|
||||
"size": 4}]}
|
||||
generate_pack.annotate_pack_systems(pack_list, generate_pack.pack_systems(install_list))
|
||||
scope.annotate_pack_systems(pack_list, scope.pack_systems(install_list))
|
||||
self.assertEqual(pack_list["list_version"], "43.1")
|
||||
pack = Path(_tempdir(self)) / "Batocera_43.1_BIOS_Pack.zip"
|
||||
with zipfile.ZipFile(pack, "w") as archive:
|
||||
|
||||
Reference in new issue
Block a user