mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-29 21:08:53 -06:00
refactor: read mame release tags in the model
The tag and version helpers lived in the romset DAT importer, so the site cards, which may not import a scraper, matched the label with their own pattern. model.mamerelease now owns mame_tag, mame_version and tag_version. Both scrapers and the cards call it. check_freshness only lifts tags out of labels and converts nothing, so it keeps its own search.
This commit is contained in:
1 parent
8a8fa71fbc
commit
4acfd8f763
7 files changed
+41
-19
No files matched your search
@@ -598,13 +598,15 @@ class ListXmlRecipes(unittest.TestCase):
|
||||
self.assertEqual(json.load(handle)["upstream"], {"blobs": {"X.dat": "bbb"}})
|
||||
|
||||
def test_mame_tags_and_versions(self):
|
||||
from scripts.scraper.romset_dat_importer import mame_tag, mame_version
|
||||
from model.mamerelease import mame_tag, mame_version, tag_version
|
||||
|
||||
self.assertEqual(mame_tag("0.289"), "mame0289")
|
||||
self.assertEqual(mame_tag("0.78"), "mame0078")
|
||||
self.assertEqual(mame_version("mame0289"), "0.289")
|
||||
self.assertEqual(mame_version("mame78"), "78")
|
||||
self.assertEqual(mame_version("master"), "master")
|
||||
self.assertEqual(tag_version("mame0121"), "0.121")
|
||||
self.assertIsNone(tag_version("mame78"))
|
||||
|
||||
def test_git_blob_sha_matches_git(self):
|
||||
# The values git hash-object gives for the empty blob and for "hi".
|
||||
|
||||
Reference in new issue
Block a user