Files
Grinch-AP/worlds/subnautica/test/__init__.py
black-sliver 5882ce7380 Various worlds: Fix more absolute world imports (#3510)
* Adventure: remove absolute imports

* Alttp: remove absolute imports (all but tests)

* Aquaria: remove absolute imports in tests

running tests from apworld may fail (on 3.8 and maybe in the future) otherwise

* DKC3: remove absolute imports

* LADX: remove absolute imports

* Overcooked 2: remove absolute imports in tests

running tests from apworld may fail otherwise

* Rogue Legacy: remove absolute imports in tests

running tests from apworld may fail otherwise

* SC2: remove absolute imports

* SMW: remove absolute imports

* Subnautica: remove absolute imports in tests

running tests from apworld may fail otherwise

* Zillion: remove absolute imports in tests

running tests from apworld may fail otherwise
2024-06-27 08:51:27 +02:00

26 lines
965 B
Python

import unittest
from worlds import subnautica
class SubnauticaTest(unittest.TestCase):
# This is an assumption in the mod side
scancutoff: int = 33999
def testIDRange(self):
for name, id in subnautica.SubnauticaWorld.location_name_to_id.items():
with self.subTest(location=name):
if "Scan" in name:
self.assertLess(self.scancutoff, id)
else:
self.assertGreater(self.scancutoff, id)
def testGroupAssociation(self):
from .. import items
for item_id, item_data in items.item_table.items():
if item_data.type == items.ItemType.group:
with self.subTest(item=item_data.name):
self.assertIn(item_id, items.group_items)
for item_id in items.group_items:
with self.subTest(item_id=item_id):
self.assertEqual(items.item_table[item_id].type, items.ItemType.group)