Files
Grinch-AP/test/general/__init__.py
alwaysintreble 8af7908cd0 Tests: datapackage and more multiworld renaming (#1454)
* Tests: add a test that created items and locations exist in the datapackage

* move FF validation to `assert_generate` and remove test exclusion

* test created location addresses are correct

* make the assertion proper and more verbose

* make item count test ~~a bit faster~~ a lot nicer

* 120 blaze it

* name test multiworld setup better and fix another over 120 line in FFR
2023-02-15 22:46:10 +01:00

22 lines
723 B
Python

from argparse import Namespace
from BaseClasses import MultiWorld
from worlds.AutoWorld import call_all
gen_steps = ["generate_early", "create_regions", "create_items", "set_rules", "generate_basic", "pre_fill"]
def setup_solo_multiworld(world_type) -> MultiWorld:
multiworld = MultiWorld(1)
multiworld.game[1] = world_type.game
multiworld.player_name = {1: "Tester"}
multiworld.set_seed()
args = Namespace()
for name, option in world_type.option_definitions.items():
setattr(args, name, {1: option.from_any(option.default)})
multiworld.set_options(args)
multiworld.set_default_common_options()
for step in gen_steps:
call_all(multiworld, step)
return multiworld