mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-25 05:09:03 -05:00
chore: drop a fixed count from the emulator nav
This commit is contained in:
1 parent
8aa1e1cea1
commit
8b6a5d8a8e
2 files changed
+3
-4
No files matched your search
@@ -6357,8 +6357,8 @@ def nav_emulators(profiles: dict) -> dict[str, dict]:
|
||||
def _emulator_nav(profiles: dict) -> list:
|
||||
"""Emulators by initial (A, B, C), one level deep. A name that does not
|
||||
open on a letter goes under "0 to 9". The route middleware draws every
|
||||
initial but the open one as a single link, so a page carries one
|
||||
initial's links, at most 60."""
|
||||
initial but the open one as a single link, so a page carries the links
|
||||
of one initial only."""
|
||||
groups: dict[str, list[tuple[str, str]]] = {}
|
||||
for key, profile in nav_emulators(profiles).items():
|
||||
display = str(profile.get("emulator", key))
|
||||
|
||||
@@ -136,7 +136,7 @@ class EmulatorsOneLevelDeep(unittest.TestCase):
|
||||
self.assertEqual(nav, ["emulators/index.md", {"D": [
|
||||
{"Dolphin": "emulators/dolphin.md"}, {"DuckStation": "emulators/duckstation.md"}]}])
|
||||
|
||||
def test_no_initial_holds_more_than_sixty(self):
|
||||
def test_every_initial_holds_pages(self):
|
||||
from common import load_emulator_profiles
|
||||
|
||||
nav = generate_site._emulator_nav(load_emulator_profiles(str(REPO_ROOT / "emulators")))
|
||||
@@ -144,7 +144,6 @@ class EmulatorsOneLevelDeep(unittest.TestCase):
|
||||
(label, pages), = group.items()
|
||||
with self.subTest(initial=label):
|
||||
self.assertTrue(all(isinstance(next(iter(p.values())), str) for p in pages))
|
||||
self.assertLessEqual(len(pages), 60)
|
||||
|
||||
|
||||
class OneNextPerPage(unittest.TestCase):
|
||||
|
||||
Reference in new issue
Block a user