diff --git a/test/general/test_entrances.py b/test/general/test_entrances.py index f1a0fb124781..9b6d462523b4 100644 --- a/test/general/test_entrances.py +++ b/test/general/test_entrances.py @@ -8,7 +8,7 @@ def test_entrance_connection_steps(self): """Tests that Regions and Locations aren't created after `create_items`.""" def get_entrance_name_to_source_and_target_dict(world: World): return [ - (entrance.name, entrance.parent_region.name, entrance.target.name) + (entrance.name, entrance.parent_region.name, entrance.target.connected_region) for entrance in world.get_entrances() ] @@ -20,17 +20,24 @@ def get_entrance_name_to_source_and_target_dict(world: World): multiworld = setup_solo_multiworld(world_type, gen_steps) entrances = multiworld.get_entrances() - self.assertTrue( - all(entrance.parent_region is not None and entrance.target is not None for entrance in entrances), - f"{game_name} had unconnected entrances after connect_entrances." - ) original_entrances = get_entrance_name_to_source_and_target_dict(multiworld.worlds[1]) + self.assertTrue( + all(entrance[1] is not None and entrance[2] is not None for entrance in original_entrances), + f"{game_name} had unconnected entrances after {step}" + ) + for step in additional_steps: with self.subTest("Step", step=step): call_all(multiworld, "steps") - entrances_after_step = get_entrance_name_to_source_and_target_dict(multiworld.worlds[1]) + step_entrances = get_entrance_name_to_source_and_target_dict(multiworld.worlds[1]) + + self.assertTrue( + all(entrance[1] is not None and entrance[2] is not None for entrance in step_entrances), + f"{game_name} had unconnected entrances after {step}" + ) + self.assertEqual( - original_entrances, entrances_after_step, f"{game_name} modified entrances during {step}" + original_entrances, step_entrances, f"{game_name} modified entrances during {step}" )