Tests: world test base class (#1116)

* world test base class

* game not instance property

* I would have guessed that this only collected 1.

* game property

* move SoE tests into worlds

* don't force auto world setup
This commit is contained in:
Doug Hoskisson
2022-10-18 09:54:41 -07:00
committed by GitHub
parent 49ae79e5ce
commit f12b73f487
8 changed files with 39 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
from __future__ import annotations
from argparse import Namespace
import copy
from enum import unique, IntEnum, IntFlag
@@ -54,6 +55,7 @@ class MultiWorld():
indirect_connections: Dict[Region, Set[Entrance]]
exclude_locations: Dict[int, Options.ExcludeLocations]
game: Dict[int, str]
class AttributeProxy():
def __init__(self, rule):
@@ -200,7 +202,7 @@ class MultiWorld():
self.slot_seeds = {player: random.Random(self.random.getrandbits(64)) for player in
range(1, self.players + 1)}
def set_options(self, args):
def set_options(self, args: Namespace) -> None:
for option_key in Options.common_options:
setattr(self, option_key, getattr(args, option_key, {}))
for option_key in Options.per_game_common_options: