Files
Grinch-AP/worlds/zillion/test/TestReproducibleRandom.py
black-sliver 5882ce7380 Various worlds: Fix more absolute world imports (#3510)
* Adventure: remove absolute imports

* Alttp: remove absolute imports (all but tests)

* Aquaria: remove absolute imports in tests

running tests from apworld may fail (on 3.8 and maybe in the future) otherwise

* DKC3: remove absolute imports

* LADX: remove absolute imports

* Overcooked 2: remove absolute imports in tests

running tests from apworld may fail otherwise

* Rogue Legacy: remove absolute imports in tests

running tests from apworld may fail otherwise

* SC2: remove absolute imports

* SMW: remove absolute imports

* Subnautica: remove absolute imports in tests

running tests from apworld may fail otherwise

* Zillion: remove absolute imports in tests

running tests from apworld may fail otherwise
2024-06-27 08:51:27 +02:00

30 lines
843 B
Python

from typing import cast
from . import ZillionTestBase
from .. 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