This commit is contained in:
Fabian Dill
2022-04-01 03:32:17 +02:00
committed by Fabian Dill
parent 199b778d2b
commit 65864e273b
2 changed files with 8 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ from worlds.AutoWorld import AutoWorldRegister
from . import setup_default_world
class TestBase(unittest.TestCase):
gen_steps = ["generate_early", "create_regions", "create_items", "set_rules", "generate_basic", "pre_fill"]
@@ -14,10 +15,12 @@ class TestBase(unittest.TestCase):
if game_name != "Ori and the Blind Forest" and game_name != "Final Fantasy": # TODO: fix Ori Logic
with self.subTest("Game", game=game_name):
world = setup_default_world(world_type)
excluded = world.exclude_locations[1].value
state = world.get_all_state(False)
for location in world.get_locations():
with self.subTest("Location should be reached", location=location):
self.assertTrue(location.can_reach(state))
if location.name not in excluded:
with self.subTest("Location should be reached", location=location):
self.assertTrue(location.can_reach(state))
def testEmptyStateCanReachSomething(self):
for game_name, world_type in AutoWorldRegister.world_types.items():