From 01ddbec80f37c6461eace3d026f586af9e670755 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Wed, 11 Nov 2026 15:03:17 +0100 Subject: [PATCH] fix: follow the get page title rule in its test The test rebuilt the old rule (any profile of the setup's name) and so expected "BIOS pack for RetroArch" once the frontend profile landed. It now reads the profile's files, as get_page_title does. --- tests/test_site_entry.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_site_entry.py b/tests/test_site_entry.py index 557c67f27..dc6e95367 100644 --- a/tests/test_site_entry.py +++ b/tests/test_site_entry.py @@ -41,6 +41,8 @@ import unittest from datetime import datetime, timezone from pathlib import Path +import yaml + REPO_ROOT = Path(__file__).resolve().parents[1] sys.path.insert(0, str(REPO_ROOT / "scripts")) sys.path.insert(0, str(REPO_ROOT)) @@ -983,9 +985,10 @@ class GetPagesSayWhatTheyHold(unittest.TestCase): display = _display(name) text = sitepages.page(f"get/{name}.md").read_text(encoding="utf-8") kind = "pack" if REGISTRY[name].get("release_pack") is True else "files" - title = (f"BIOS {kind} for {display}" - if (REPO_ROOT / "emulators" / f"{name}.yml").is_file() - else f"{display} BIOS {kind}") + # A profile that lists files titles its page " BIOS files". + profile = REPO_ROOT / "emulators" / f"{name}.yml" + lists = profile.is_file() and (yaml.safe_load(profile.read_text(encoding="utf-8")) or {}).get("files") + title = f"BIOS {kind} for {display}" if lists else f"{display} BIOS {kind}" with self.subTest(setup=name): self.assertEqual(generate_site.get_page_title(name, display), title) self.assertIn(f"title: {title}\n", text)