WebHost: Allowing options that work on WebHost to be used in presets (#3441)

This commit is contained in:
Exempt-Medic
2024-06-03 04:42:27 -04:00
committed by GitHub
parent 424c8b0be9
commit d9120f0bea
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
import unittest
from worlds import AutoWorldRegister
from Options import Choice, NamedRange, Toggle, Range
from Options import ItemDict, NamedRange, NumericOption, OptionList, OptionSet
class TestOptionPresets(unittest.TestCase):
@@ -14,7 +14,7 @@ class TestOptionPresets(unittest.TestCase):
with self.subTest(game=game_name, preset=preset_name, option=option_name):
try:
option = world_type.options_dataclass.type_hints[option_name].from_any(option_value)
supported_types = [Choice, Toggle, Range, NamedRange]
supported_types = [NumericOption, OptionSet, OptionList, ItemDict]
if not any([issubclass(option.__class__, t) for t in supported_types]):
self.fail(f"'{option_name}' in preset '{preset_name}' for game '{game_name}' "
f"is not a supported type for webhost. "