1
1
import unittest
2
2
3
3
from worlds import AutoWorldRegister
4
- from Options import Choice , SpecialRange , Toggle , Range
4
+ from Options import Choice , NamedRange , Toggle , Range
5
5
6
6
7
7
class TestOptionPresets (unittest .TestCase ):
@@ -14,7 +14,7 @@ def test_option_presets_have_valid_options(self):
14
14
with self .subTest (game = game_name , preset = preset_name , option = option_name ):
15
15
try :
16
16
option = world_type .options_dataclass .type_hints [option_name ].from_any (option_value )
17
- supported_types = [Choice , Toggle , Range , SpecialRange ]
17
+ supported_types = [Choice , Toggle , Range , NamedRange ]
18
18
if not any ([issubclass (option .__class__ , t ) for t in supported_types ]):
19
19
self .fail (f"'{ option_name } ' in preset '{ preset_name } ' for game '{ game_name } ' "
20
20
f"is not a supported type for webhost. "
@@ -46,8 +46,8 @@ def test_option_preset_values_are_explicitly_defined(self):
46
46
47
47
# Check for from_text resolving to a different value. ("random" is allowed though.)
48
48
if option_value != "random" and isinstance (option_value , str ):
49
- # Allow special named values for SpecialRange option presets.
50
- if isinstance (option , SpecialRange ):
49
+ # Allow special named values for NamedRange option presets.
50
+ if isinstance (option , NamedRange ):
51
51
self .assertTrue (
52
52
option_value in option .special_range_names ,
53
53
f"Invalid preset '{ option_name } ': '{ option_value } ' in preset '{ preset_name } ' "
0 commit comments