Tests: ensure unreachable_regions is correctly set

This commit is contained in:
Fabian Dill
2023-07-18 04:18:26 +02:00
committed by Fabian Dill
parent f1d09d2282
commit 60586aa284

View File

@@ -44,7 +44,10 @@ class TestBase(unittest.TestCase):
self.assertTrue(location.can_reach(state), f"{location.name} unreachable")
for region in world.get_regions():
if region.name not in unreachable_regions:
if region.name in unreachable_regions:
with self.subTest("Region should be unreachable", region=region):
self.assertFalse(region.can_reach(state))
else:
with self.subTest("Region should be reached", region=region):
self.assertTrue(region.can_reach(state))