Archipelago/test/general/TestImplemented.py

25 lines
1.2 KiB
Python
Raw Normal View History

import unittest
2022-05-10 17:43:44 +00:00
from worlds.AutoWorld import AutoWorldRegister
from . import setup_default_world
2022-05-10 17:43:44 +00:00
class TestImplemented(unittest.TestCase):
def testCompletionCondition(self):
"""Ensure a completion condition is set that has requirements."""
for game_name, world_type in AutoWorldRegister.world_types.items():
if not world_type.hidden and game_name not in {"ArchipIDLE", "Final Fantasy", "Sudoku"}:
with self.subTest(game_name):
multiworld = setup_default_world(world_type)
self.assertFalse(multiworld.completion_condition[1](multiworld.state))
def testEntranceParents(self):
"""Tests that the parents of created Entrances match the exiting Region."""
for game_name, world_type in AutoWorldRegister.world_types.items():
if not world_type.hidden and game_name not in {"Final Fantasy"}:
with self.subTest(game_name):
multiworld = setup_default_world(world_type)
for region in multiworld.regions:
for exit in region.exits:
self.assertEqual(exit.parent_region, region)