mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-17 07:07:52 -06:00
fix: badge only the platforms that read a file
This commit is contained in:
1 parent
5e9c2c87b6
commit
fbad34adbd
2 files changed
+40
-1
No files matched your search
@@ -8,6 +8,8 @@ import unittest
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
|
||||
import yaml
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(REPO_ROOT / "scripts"))
|
||||
|
||||
@@ -100,6 +102,24 @@ class BundledFilesAreNotToSource(unittest.TestCase):
|
||||
self.assertIn("| [ZQuest Classic](emulators/zq.md) | 4 | 1 | 0 | 0 | 2 | "
|
||||
'<span class="rb-badge rb-badge-danger">1</span> |', page)
|
||||
|
||||
def test_a_row_names_only_the_platforms_that_read_it(self):
|
||||
"""cdbios.bin, read by standalone BlastEm only and never on RetroBat,
|
||||
was badged retroarch, lakka and retrobat."""
|
||||
import generate_site
|
||||
from common import load_platform_config, resolve_platform_cores
|
||||
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
profile = yaml.safe_load((root / "emulators" / "blastem.yml").read_text(encoding="utf-8"))
|
||||
configs = {}
|
||||
for name in ("retroarch", "lakka", "retrobat", "batocera"):
|
||||
config = load_platform_config(name, str(root / "platforms"))
|
||||
if "blastem" in resolve_platform_cores(config, {"blastem": profile}):
|
||||
configs[name] = config
|
||||
self.assertIn("retroarch", configs)
|
||||
self.assertIn("retrobat", configs)
|
||||
found = generate_site.reading_platforms("blastem", profile, "cdbios.bin", configs)
|
||||
self.assertFalse(found & {"retroarch", "lakka", "retrobat"}, found)
|
||||
|
||||
|
||||
class StructuredBlocks(unittest.TestCase):
|
||||
PIN = "1e0de94dc7e669c0925a22c0fccf6cdc837af0a0"
|
||||
|
||||
Reference in new issue
Block a user