fix: label every platform that pulls all libretro

The cross-reference page read the label from the shape of cores:, so
RetroPie and RetroDECK, which name retroarch in a list, showed no
"(all libretro)". The label now comes from the resolved core set.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 05:07:09 +02:00
1 parent fe652bf508
commit ddfac4a059
2 files changed
+44 -5

No files matched your search

+25
View File
@@ -44,5 +44,30 @@ class SiteCoreCounts(unittest.TestCase):
self.assertEqual(shown[cov["platform"]], expected)
class AllLibretroLabel(unittest.TestCase):
"""RetroPie and RetroDECK pull in every libretro core by naming retroarch
in a list, and the label read "(all libretro)" for RetroArch and Lakka
only, the two whose cores: is the string."""
PROFILES = {
"a": {"type": "libretro"},
"b": {"type": "standalone + libretro"},
"sa": {"type": "standalone"},
}
def test_a_list_naming_retroarch_is_labelled(self):
note = generate_site._core_scope_note(
{"cores": ["retroarch", "sa"]}, self.PROFILES)
self.assertEqual(note, " (all libretro, plus 1 other core)")
def test_the_string_form_is_labelled(self):
note = generate_site._core_scope_note({"cores": "all_libretro"}, self.PROFILES)
self.assertEqual(note, " (all libretro)")
def test_a_selection_is_not(self):
self.assertEqual(
generate_site._core_scope_note({"cores": ["a", "sa"]}, self.PROFILES), "")
if __name__ == "__main__":
unittest.main()