Core: Add a test that checks all registered patches matches the name of a registered world (#4633)

Co-authored-by: qwint <qwint.42@gmail.com>
This commit is contained in:
Justus Lind
2025-03-24 12:30:44 +10:00
committed by GitHub
parent dbaac47d1e
commit 1416f631cc

View File

@@ -0,0 +1,11 @@
import unittest
from worlds.AutoWorld import AutoWorldRegister
from worlds.Files import AutoPatchRegister
class TestPatches(unittest.TestCase):
def test_patch_name_matches_game(self) -> None:
for game_name in AutoPatchRegister.patch_types:
with self.subTest(game=game_name):
self.assertIn(game_name, AutoWorldRegister.world_types.keys(),
f"Patch '{game_name}' does not match the name of any world.")