mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Tests: add a test to check for dupe locations (#1378)
This commit is contained in:
16
test/general/TestLocations.py
Normal file
16
test/general/TestLocations.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import unittest
|
||||||
|
from collections import Counter
|
||||||
|
from worlds.AutoWorld import AutoWorldRegister
|
||||||
|
from . import setup_default_world
|
||||||
|
|
||||||
|
|
||||||
|
class TestBase(unittest.TestCase):
|
||||||
|
def testCreateDuplicateLocations(self):
|
||||||
|
for game_name, world_type in AutoWorldRegister.world_types.items():
|
||||||
|
if game_name in {"Final Fantasy"}:
|
||||||
|
continue
|
||||||
|
multiworld = setup_default_world(world_type)
|
||||||
|
locations = Counter(multiworld.get_locations())
|
||||||
|
if locations:
|
||||||
|
self.assertLessEqual(locations.most_common(1)[0][1], 1,
|
||||||
|
f"{world_type.game} has duplicate of location {locations.most_common(1)}")
|
Reference in New Issue
Block a user