From 24105ac249ddfb6eb708cba016934c757e2287cf Mon Sep 17 00:00:00 2001 From: Doug Hoskisson Date: Fri, 21 Oct 2022 18:42:16 -0700 Subject: [PATCH] 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 --- test/worlds/zillion/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/worlds/zillion/__init__.py b/test/worlds/zillion/__init__.py index 7b2ec669..43100d3a 100644 --- a/test/worlds/zillion/__init__.py +++ b/test/worlds/zillion/__init__.py @@ -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