mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-07 15:13:52 -08:00
Tests: test that every option in a preset is visible in either simple or complex UI (#5750)
This commit is contained in:
@@ -2,7 +2,7 @@ import unittest
|
||||
|
||||
from BaseClasses import PlandoOptions
|
||||
from worlds import AutoWorldRegister
|
||||
from Options import OptionCounter, NamedRange, NumericOption, OptionList, OptionSet
|
||||
from Options import OptionCounter, NamedRange, NumericOption, OptionList, OptionSet, Visibility
|
||||
|
||||
|
||||
class TestOptionPresets(unittest.TestCase):
|
||||
@@ -19,6 +19,9 @@ class TestOptionPresets(unittest.TestCase):
|
||||
# pass in all plando options in case a preset wants to require certain plando options
|
||||
# for some reason
|
||||
option.verify(world_type, "Test Player", PlandoOptions(sum(PlandoOptions)))
|
||||
if not (Visibility.complex_ui in option.visibility or Visibility.simple_ui in option.visibility):
|
||||
self.fail(f"'{option_name}' in preset '{preset_name}' for game '{game_name}' is not "
|
||||
f"visible in any supported UI.")
|
||||
supported_types = [NumericOption, OptionSet, OptionList, OptionCounter]
|
||||
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}' "
|
||||
|
||||
@@ -7,7 +7,7 @@ all_random = {
|
||||
"game_language": "random",
|
||||
"goal": "random",
|
||||
"goal_speed": "random",
|
||||
"total_heart_stars": "random",
|
||||
"max_heart_stars": "random",
|
||||
"heart_stars_required": "random",
|
||||
"filler_percentage": "random",
|
||||
"trap_percentage": "random",
|
||||
@@ -34,7 +34,7 @@ all_random = {
|
||||
beginner = {
|
||||
"goal": "zero",
|
||||
"goal_speed": "normal",
|
||||
"total_heart_stars": 50,
|
||||
"max_heart_stars": 50,
|
||||
"heart_stars_required": 30,
|
||||
"filler_percentage": 25,
|
||||
"trap_percentage": 0,
|
||||
|
||||
Reference in New Issue
Block a user