chore: merge round 2 fixes (pins)

# Conflicts:
#	install.ps1
#	install.sh
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 10:31:09 +02:00
commit fd1d1b7b96
28 files changed
+525 -176

No files matched your search

+4 -3
View File
@@ -3247,15 +3247,16 @@ class TheDatabaseCacheIsWrittenWhole(unittest.TestCase):
class KidVidTapesStayWithTheContent(unittest.TestCase):
"""Stella opens its KidVid tapes by bare name (stella2014, from the
working directory) or from its base directory (stella2023, the content
folder): never the system directory. Without load_from every Linux pack
put about 68 MB of WAVs at the BIOS root, in two cases."""
folder, and stella, a folder under the save directory): never the system
directory. Without load_from every Linux pack put about 68 MB of WAVs at
the BIOS root, in two cases."""
def test_no_pack_places_them_in_the_system_directory(self):
from scripts.common import load_emulator_profiles
from scripts.validation import outside_gap_scope
profiles = load_emulator_profiles(str(ROOT / "emulators"))
for name in ("stella2014", "stella2023"):
for name in ("stella", "stella2014", "stella2023"):
tapes = [f for f in profiles[name]["files"]
if f["name"].lower().endswith(".wav")]
with self.subTest(profile=name):
+27
View File
@@ -4222,6 +4222,15 @@ class TestReconcilePerFile(unittest.TestCase):
result = profile_sync.reconcile_self_check([anchored, same, other])
self.assertEqual([p.status for p in result], ["ANCHORED", "ANCHORED", "AMBIGUOUS"])
def test_a_settled_part_keeps_the_repository_of_its_anchor(self):
anchored = PartResult(RefPart("mt32emu.h", 5112, 5112, "5112"), "ANCHORED",
None, None, None, [], repo="schelling/dosbox-pure")
same = PartResult(RefPart("mt32emu.h", 5129, 5129, "5129"), "MOVED",
None, 5112, 5112, [5112])
result = profile_sync.reconcile_self_check([anchored, same])
self.assertEqual(result[1].status, "ANCHORED")
self.assertEqual(result[1].repo, "schelling/dosbox-pure")
def test_a_compared_part_is_never_rewritten(self):
anchored = PartResult(RefPart("a.c", 5, 5, "5"), "ANCHORED", None, None, None, [])
shifted = PartResult(RefPart("a.c", 9, 9, "9"), "SHIFTED", None, 12, 12, [])
@@ -4229,6 +4238,24 @@ class TestReconcilePerFile(unittest.TestCase):
self.assertEqual(result[1].status, "SHIFTED")
class TestCollapsingMoves(unittest.TestCase):
"""A recale never folds two parts of one ref onto the same line."""
def test_a_move_onto_a_sibling_part_goes_to_review(self):
sha = PartResult(RefPart("mt32emu.h", 5112, 5112, "upstream mt32emu.h:5112", "upstream"),
"ANCHORED", None, None, None, [])
info = PartResult(RefPart("mt32emu.h", 5129, 5129, "source mt32emu.h:5129", "source"),
"MOVED", None, 5112, 5112, [5112])
result = profile_sync.refuse_collapsing_moves([sha, info])
self.assertEqual([p.status for p in result], ["ANCHORED", "AMBIGUOUS"])
def test_a_move_to_a_free_line_is_kept(self):
first = PartResult(RefPart("a.c", 5, 5, "a.c:5"), "ANCHORED", None, None, None, [])
moved = PartResult(RefPart("a.c", 9, 9, "a.c:9"), "MOVED", None, 12, 12, [12])
result = profile_sync.refuse_collapsing_moves([first, moved])
self.assertEqual(result[1].status, "MOVED")
class TestRealignFlagMatrix(unittest.TestCase):
"""--realign-prose applies a flag or refuses it, never swallows it."""
+29
View File
@@ -919,6 +919,17 @@ class RegionalRequestsKeepWhatTheCodeLoads(unittest.TestCase):
("bizhawk", ["north-america"], "DSi_Nand_USA.bin"),
("bizhawk", ["oceania"], "DSi_Nand_AUS.bin"),
("bizhawk", ["china", "japan"], "DSi_Nand_CHN.bin"),
("genesis_plus_gx", ["australia", "japan"], "bios_U.sms"),
("genesis_plus_gx", ["brazil", "japan"], "bios_U.sms"),
("genesis_plus_gx_wide", ["australia", "japan"], "bios_U.sms"),
("genesis_plus_gx_expanded", ["brazil", "japan"], "bios_U.sms"),
("dolphin", ["brazil", "europe"], "dolphin-emu/Sys/GC/USA/IPL.bin"),
("ishiiruka", ["brazil", "europe"], "dolphin-emu/Sys/GC/USA/IPL.bin"),
("dolphin-mmjr", ["brazil", "europe"], "GC/USA/IPL.bin"),
("dolphin-mmjr2", ["brazil", "europe"], "GC/USA/IPL.bin"),
("primehack", ["brazil", "europe"], "GC/USA/IPL.bin"),
("triforce", ["brazil", "europe"], "GC/USA/IPL.bin"),
("triforce", ["brazil", "europe"], "GC/USA/IPL_TRI.bin"),
)
def test_each_request_keeps_its_file(self):
@@ -1044,6 +1055,24 @@ class UnknownRegionSaysWhatToType(unittest.TestCase):
self.assertIn("Short forms:", str(caught.exception))
class CountryCodesNameTheirTerritory(unittest.TestCase):
"""`au` was unknown while `jp`, `us`, `kr` and `gb` were aliases, and the
first spelling offered for it was `auto`, which means world."""
def test_au_is_australia(self):
self.assertEqual(region.parse_requested("au,jp"), ["australia", "japan"])
def test_every_territory_answers_to_a_two_letter_code(self):
areas = set(region.AREA_TERRITORIES)
territories = {
member for members in region.REGION_TREE.values() for member in members
} - areas
coded = {
target for alias, target in region.ALIASES.items() if len(alias) == 2
} | {slug for slug in territories if len(slug) == 2}
self.assertEqual(territories - coded, set())
class GenesisPlusGxUsBiosServesEurope(unittest.TestCase):
"""sms_cart_region_detect returns REGION_USA for any export header