mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Tests: Add tests for location name groups (#1706)
This commit is contained in:
@@ -59,3 +59,13 @@ class TestBase(unittest.TestCase):
|
||||
f"{game_name} modified region count during pre_fill")
|
||||
self.assertGreaterEqual(location_count, len(multiworld.get_locations()),
|
||||
f"{game_name} modified locations count during pre_fill")
|
||||
|
||||
def testLocationGroup(self):
|
||||
"""Test that all location name groups contain valid locations and don't share names."""
|
||||
for game_name, world_type in AutoWorldRegister.world_types.items():
|
||||
with self.subTest(game_name, game_name=game_name):
|
||||
for group_name, locations in world_type.location_name_groups.items():
|
||||
with self.subTest(group_name, group_name=group_name):
|
||||
for location in locations:
|
||||
self.assertIn(location, world_type.location_name_to_id)
|
||||
self.assertNotIn(group_name, world_type.location_name_to_id)
|
||||
|
Reference in New Issue
Block a user