mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Tests: now autoload tests from /worlds/*/test (#1318)
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
29
worlds/zillion/test/TestReproducibleRandom.py
Normal file
29
worlds/zillion/test/TestReproducibleRandom.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from typing import cast
|
||||
from . import ZillionTestBase
|
||||
|
||||
from worlds.zillion import ZillionWorld
|
||||
|
||||
|
||||
class SeedTest(ZillionTestBase):
|
||||
auto_construct = False
|
||||
|
||||
def test_reproduce_seed(self) -> None:
|
||||
self.world_setup(42)
|
||||
z_world = cast(ZillionWorld, self.multiworld.worlds[1])
|
||||
r = z_world.zz_system.randomizer
|
||||
assert r
|
||||
randomized_requirements_first = tuple(
|
||||
location.req.gun
|
||||
for location in r.locations.values()
|
||||
)
|
||||
|
||||
self.world_setup(42)
|
||||
z_world = cast(ZillionWorld, self.multiworld.worlds[1])
|
||||
r = z_world.zz_system.randomizer
|
||||
assert r
|
||||
randomized_requirements_second = tuple(
|
||||
location.req.gun
|
||||
for location in r.locations.values()
|
||||
)
|
||||
|
||||
assert randomized_requirements_first == randomized_requirements_second
|
||||
Reference in New Issue
Block a user