mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-07 18:43:46 -06:00
fix: keep tree entries out of the asset store
This commit is contained in:
1 parent
faa8af0800
commit
3766588ec1
3 files changed
+33
No files matched your search
@@ -3780,5 +3780,28 @@ class SignaturesCarryTheirTypes(unittest.TestCase):
|
||||
self.assertEqual(self._missing(ROOT / "scripts" / name), [])
|
||||
|
||||
|
||||
|
||||
class ATreeNobodyHoldsIsMissingNotAnAsset(unittest.TestCase):
|
||||
"""julius's caesar3/ directory, unexpanded, went to the asset store,
|
||||
which answered with .cache/large/ itself: the emulator pack died on
|
||||
IsADirectoryError where verify said MISSING."""
|
||||
|
||||
def test_directory_entries_never_reach_the_asset_store(self):
|
||||
from scripts import largefiles, packresolve
|
||||
|
||||
db = {"files": {}, "indexes": {"by_name": {}, "by_md5": {}, "by_crc32": {},
|
||||
"by_path_suffix": {}}}
|
||||
for entry in ({"name": "caesar3/", "type": "directory"}, {"name": "caesar3/"}):
|
||||
with self.subTest(entry=entry):
|
||||
self.assertEqual(
|
||||
packresolve.resolve_file(entry, db, "bios", {}, offline=True),
|
||||
(None, "not_found"),
|
||||
)
|
||||
self.assertIsNone(largefiles.fetch_large_file("caesar3/", offline=True))
|
||||
with tempfile.TemporaryDirectory(dir=TMP_ROOT) as tmp:
|
||||
Path(tmp, "sub").mkdir()
|
||||
self.assertIsNone(largefiles._fetch_asset("sub", tmp, "", "", offline=True))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user