mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-04-15 23:43:34 -07:00
Tests: Standardize World Exclusions, Strengthen LCS Test (#4423)
This commit is contained in:
@@ -33,7 +33,10 @@ class TestBase(unittest.TestCase):
|
||||
def test_location_creation_steps(self):
|
||||
"""Tests that Regions and Locations aren't created after `create_items`."""
|
||||
gen_steps = ("generate_early", "create_regions", "create_items")
|
||||
for game_name, world_type in AutoWorldRegister.world_types.items():
|
||||
excluded_games = ("Ocarina of Time", "Pokemon Red and Blue")
|
||||
worlds_to_test = {game: world
|
||||
for game, world in AutoWorldRegister.world_types.items() if game not in excluded_games}
|
||||
for game_name, world_type in worlds_to_test.items():
|
||||
with self.subTest("Game", game_name=game_name):
|
||||
multiworld = setup_solo_multiworld(world_type, gen_steps)
|
||||
region_count = len(multiworld.get_regions())
|
||||
@@ -54,13 +57,13 @@ class TestBase(unittest.TestCase):
|
||||
call_all(multiworld, "generate_basic")
|
||||
self.assertEqual(region_count, len(multiworld.get_regions()),
|
||||
f"{game_name} modified region count during generate_basic")
|
||||
self.assertGreaterEqual(location_count, len(multiworld.get_locations()),
|
||||
self.assertEqual(location_count, len(multiworld.get_locations()),
|
||||
f"{game_name} modified locations count during generate_basic")
|
||||
|
||||
call_all(multiworld, "pre_fill")
|
||||
self.assertEqual(region_count, len(multiworld.get_regions()),
|
||||
f"{game_name} modified region count during pre_fill")
|
||||
self.assertGreaterEqual(location_count, len(multiworld.get_locations()),
|
||||
self.assertEqual(location_count, len(multiworld.get_locations()),
|
||||
f"{game_name} modified locations count during pre_fill")
|
||||
|
||||
def test_location_group(self):
|
||||
|
||||
Reference in New Issue
Block a user