Tests: fix random failures on Zillion tests (#1128)

* tests: fix random failures on Zillion tests

Normally there's a low probably that the game doesn't require a power-up that it usually requires.
This makes sure it always has that requirement for tests.

* better type narrowing
This commit is contained in:
Doug Hoskisson
2022-10-21 18:42:16 -07:00
committed by GitHub
parent f18df4c1df
commit 24105ac249

View File

@@ -1,5 +1,13 @@
from test.worlds.test_base import WorldTestBase
from worlds.zillion.region import ZillionLocation
class ZillionTestBase(WorldTestBase):
game = "Zillion"
def world_setup(self) -> None:
super().world_setup()
# make sure game requires gun 3 for tests
for location in self.world.get_locations():
if isinstance(location, ZillionLocation) and location.name.startswith("O-7"):
location.zz_loc.req.gun = 3