From 8b6a5d8a8ee8159ba56943f8661ff822b3613547 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 23 Oct 2026 02:18:47 +0200 Subject: [PATCH] chore: drop a fixed count from the emulator nav --- scripts/generate_site.py | 4 ++-- tests/test_site_r2_nav.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/generate_site.py b/scripts/generate_site.py index f1b1368d..f033e38c 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -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)) diff --git a/tests/test_site_r2_nav.py b/tests/test_site_r2_nav.py index e82f7bc3..a9511d6e 100644 --- a/tests/test_site_r2_nav.py +++ b/tests/test_site_r2_nav.py @@ -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):