mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-29 12:58:51 -06:00
refactor: move generate_db logic into collection
This commit is contained in:
1 parent
9de949dfdb
commit
ed6ae84d2c
37 files changed
+988
-884
No files matched your search
@@ -105,7 +105,7 @@ class AbsentFileIsNotReplacedByAHomonym(unittest.TestCase):
|
||||
import hashlib
|
||||
import tempfile
|
||||
|
||||
import generate_db
|
||||
from collection.indexes import build_indexes
|
||||
|
||||
self._tmp = tempfile.TemporaryDirectory()
|
||||
root = Path(self._tmp.name)
|
||||
@@ -123,7 +123,7 @@ class AbsentFileIsNotReplacedByAHomonym(unittest.TestCase):
|
||||
"sha1": sha1, "md5": hashlib.md5(payload).hexdigest(),
|
||||
"sha256": hashlib.sha256(payload).hexdigest(), "crc32": "0",
|
||||
}
|
||||
indexes = generate_db.build_indexes(
|
||||
indexes = build_indexes(
|
||||
{s: {**r, "path": r["path"][len(str(root)) + 1:]} for s, r in files.items()},
|
||||
{},
|
||||
)
|
||||
@@ -154,7 +154,7 @@ class APlatformEntryTakesNoOtherEmulatorsTree(unittest.TestCase):
|
||||
def setUp(self):
|
||||
import tempfile
|
||||
|
||||
import generate_db
|
||||
from collection.indexes import build_indexes
|
||||
|
||||
self._tmp = tempfile.TemporaryDirectory()
|
||||
self._cwd = os.getcwd()
|
||||
@@ -172,7 +172,7 @@ class APlatformEntryTakesNoOtherEmulatorsTree(unittest.TestCase):
|
||||
"sha1": sha1, "md5": hashlib.md5(payload).hexdigest(),
|
||||
"sha256": hashlib.sha256(payload).hexdigest(), "crc32": "0",
|
||||
}}
|
||||
self.db = {"files": files, "indexes": generate_db.build_indexes(files, {})}
|
||||
self.db = {"files": files, "indexes": build_indexes(files, {})}
|
||||
self.registry = {"xrick": {"local_cache": "data/xrick"}}
|
||||
|
||||
def tearDown(self):
|
||||
|
||||
Reference in new issue
Block a user