mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-07-18 03:30:45 -07:00
9c80dc6257
This allows the unit tests to be run on specific worlds only, it works by using an environment variable AP_TEST_WORLDS which is a comma separated list of world directories.
19 lines
630 B
Python
19 lines
630 B
Python
from unittest import TestCase
|
|
|
|
from settings import Group
|
|
from worlds.AutoWorld import AutoWorldRegister
|
|
|
|
|
|
class TestSettings(TestCase):
|
|
world_relevant = True
|
|
|
|
def test_settings_can_update(self) -> None:
|
|
"""
|
|
Test that world settings can update.
|
|
"""
|
|
for game_name, world_type in AutoWorldRegister.testable_worlds.items():
|
|
with self.subTest(game=game_name):
|
|
if world_type.settings is not None:
|
|
assert isinstance(world_type.settings, Group)
|
|
world_type.settings.update({}) # a previous bug had a crash in this call to update
|