diff --git a/test/general/test_implemented.py b/test/general/test_implemented.py index cf0624a2..de432e36 100644 --- a/test/general/test_implemented.py +++ b/test/general/test_implemented.py @@ -37,10 +37,11 @@ class TestImplemented(unittest.TestCase): def test_slot_data(self): """Tests that if a world creates slot data, it's json serializable.""" - for game_name, world_type in AutoWorldRegister.world_types.items(): - # has an await for generate_output which isn't being called - if game_name in {"Ocarina of Time"}: - continue + # has an await for generate_output which isn't being called + excluded_games = ("Ocarina of Time",) + 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(): multiworld = setup_solo_multiworld(world_type) with self.subTest(game=game_name, seed=multiworld.seed): distribute_items_restrictive(multiworld) diff --git a/test/general/test_items.py b/test/general/test_items.py index dbaca1c9..a48576da 100644 --- a/test/general/test_items.py +++ b/test/general/test_items.py @@ -150,8 +150,7 @@ class TestBase(unittest.TestCase): """Test that worlds don't modify the locality of items after duplicates are resolved""" gen_steps = ("generate_early",) additional_steps = ("create_regions", "create_items", "set_rules", "connect_entrances", "generate_basic", "pre_fill") - worlds_to_test = {game: world for game, world in AutoWorldRegister.world_types.items()} - for game_name, world_type in worlds_to_test.items(): + for game_name, world_type in AutoWorldRegister.world_types.items(): with self.subTest("Game", game=game_name): multiworld = setup_solo_multiworld(world_type, gen_steps) local_items = multiworld.worlds[1].options.local_items.value.copy() diff --git a/test/general/test_locations.py b/test/general/test_locations.py index 37ae94e0..77ae2602 100644 --- a/test/general/test_locations.py +++ b/test/general/test_locations.py @@ -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):