mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Tests: verify that a world doesn't use the same ID multiple times (#985)
This commit is contained in:
@@ -52,3 +52,13 @@ class TestIDs(unittest.TestCase):
|
|||||||
else:
|
else:
|
||||||
for location_id in world_type.location_id_to_name:
|
for location_id in world_type.location_id_to_name:
|
||||||
self.assertGreater(location_id, 0)
|
self.assertGreater(location_id, 0)
|
||||||
|
|
||||||
|
def testDuplicateItemIDs(self):
|
||||||
|
for gamename, world_type in AutoWorldRegister.world_types.items():
|
||||||
|
with self.subTest(game=gamename):
|
||||||
|
self.assertEqual(len(world_type.item_id_to_name), len(world_type.item_name_to_id))
|
||||||
|
|
||||||
|
def testDuplicateLocationIDs(self):
|
||||||
|
for gamename, world_type in AutoWorldRegister.world_types.items():
|
||||||
|
with self.subTest(game=gamename):
|
||||||
|
self.assertEqual(len(world_type.location_id_to_name), len(world_type.location_name_to_id))
|
||||||
|
Reference in New Issue
Block a user