mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 06:18:51 -06:00
refactor: split resolve_local_file stages
This commit is contained in:
1 parent
39a4c86917
commit
2d79a2e1b5
16 files changed
+690
-650
No files matched your search
@@ -159,7 +159,7 @@ class HeldArchivesMatchTheirRecipes(unittest.TestCase):
|
||||
bios = REPO_ROOT / "bios"
|
||||
if not bios.is_dir() or not (REPO_ROOT / "recipes").is_dir():
|
||||
self.skipTest("bios/ or recipes/ is not present")
|
||||
from resolve.localfile import variant_base_name
|
||||
from resolve.lookup import variant_base_name
|
||||
from core.hashing import md5_composite_of
|
||||
|
||||
allowed = _allowed_members()
|
||||
|
||||
@@ -7,7 +7,7 @@ import tests
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from resolve.localfile import _casefold_name_index
|
||||
from resolve.namestages import _casefold_name_index
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
@@ -54,7 +54,8 @@ class APrimaryUnderAnotherCasing(unittest.TestCase):
|
||||
self.by_name.setdefault(name, []).append(sha1)
|
||||
|
||||
def _resolve(self, name: str) -> str:
|
||||
from resolve.localfile import _casefold_name_index, resolve_local_file
|
||||
from resolve.namestages import _casefold_name_index
|
||||
from resolve.localfile import resolve_local_file
|
||||
|
||||
_casefold_name_index.clear()
|
||||
db = {"files": self.files, "indexes": {"by_name": self.by_name, "by_md5": {},
|
||||
|
||||
@@ -18,7 +18,7 @@ from pathlib import Path
|
||||
from model.database import declared_records, record_for_hash, records_for_hash
|
||||
from packs.crossref import entry_source
|
||||
from packs.integrity import _repo_satisfies_declaration
|
||||
from resolve.localfile import held_record_for
|
||||
from resolve.lookup import held_record_for
|
||||
from resolve.acceptance import _variant_candidates
|
||||
|
||||
SHA_A, SHA_B = "a" * 40, "b" * 40
|
||||
|
||||
@@ -13,7 +13,7 @@ import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from resolve.localfile import _by_affinity
|
||||
from resolve.namestages import _by_affinity
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
@@ -36,7 +36,7 @@ class DeclaredSizeOrders(unittest.TestCase):
|
||||
class OwnerOutranksSharedTree(unittest.TestCase):
|
||||
def test_the_owners_copy_beats_two_matching_segments(self):
|
||||
"""armsx2's fxaa.fx lost to NetherSX2's under shaders/common/."""
|
||||
from resolve.localfile import _by_affinity
|
||||
from resolve.namestages import _by_affinity
|
||||
|
||||
paths = [
|
||||
"bios/Other/nethersx2/assets/shaders/common/fxaa.fx",
|
||||
|
||||
@@ -16,7 +16,7 @@ import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from probes.entries import held_file, held_variants
|
||||
from resolve.localfile import variant_copies
|
||||
from resolve.lookup import variant_copies
|
||||
|
||||
|
||||
def _record(root: Path, path: str, body: bytes) -> tuple[str, dict]:
|
||||
|
||||
Reference in new issue
Block a user