summary refs log tree commit diff stats
path: root/test/TestDoors.py
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-12-18 10:46:24 -0500
committerGitHub <noreply@github.com>2023-12-18 09:46:24 -0600
commit1298dce3db9571a0907404cd3af09df948255d9e (patch)
treed264a998089d8f4a5b6833220d276bf9629d2a47 /test/TestDoors.py
parent99128f67a3b4478a5561b1ba33a2f3588a61a1df (diff)
downloadlingo-apworld-1298dce3db9571a0907404cd3af09df948255d9e.tar.gz
lingo-apworld-1298dce3db9571a0907404cd3af09df948255d9e.tar.bz2
lingo-apworld-1298dce3db9571a0907404cd3af09df948255d9e.zip
Lingo: Tests no longer disable forced good item (#2602)
The static class with the "disable forced good item" field is gone. Now, certain tests that want to check for specific access progression can run a method that removes the forced good item and adds it back to the pool. Tests that don't care about this will collect the forced good item like normal. This should prevent the intermittent fill failures on complex doors unit tests, since the forced good item should provide enough locations to fill in.
Diffstat (limited to 'test/TestDoors.py')
-rw-r--r--test/TestDoors.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/TestDoors.py b/test/TestDoors.py index f496c5f..49a0f9c 100644 --- a/test/TestDoors.py +++ b/test/TestDoors.py
@@ -8,6 +8,8 @@ class TestRequiredRoomLogic(LingoTestBase):
8 } 8 }
9 9
10 def test_pilgrim_first(self) -> None: 10 def test_pilgrim_first(self) -> None:
11 self.remove_forced_good_item()
12
11 self.assertFalse(self.multiworld.state.can_reach("The Seeker", "Region", self.player)) 13 self.assertFalse(self.multiworld.state.can_reach("The Seeker", "Region", self.player))
12 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Antechamber", "Region", self.player)) 14 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Antechamber", "Region", self.player))
13 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player)) 15 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player))
@@ -28,6 +30,8 @@ class TestRequiredRoomLogic(LingoTestBase):
28 self.assertTrue(self.can_reach_location("The Seeker - Achievement")) 30 self.assertTrue(self.can_reach_location("The Seeker - Achievement"))
29 31
30 def test_hidden_first(self) -> None: 32 def test_hidden_first(self) -> None:
33 self.remove_forced_good_item()
34
31 self.assertFalse(self.multiworld.state.can_reach("The Seeker", "Region", self.player)) 35 self.assertFalse(self.multiworld.state.can_reach("The Seeker", "Region", self.player))
32 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player)) 36 self.assertFalse(self.multiworld.state.can_reach("Pilgrim Room", "Region", self.player))
33 self.assertFalse(self.can_reach_location("The Seeker - Achievement")) 37 self.assertFalse(self.can_reach_location("The Seeker - Achievement"))
@@ -55,6 +59,8 @@ class TestRequiredDoorLogic(LingoTestBase):
55 } 59 }
56 60
57 def test_through_rhyme(self) -> None: 61 def test_through_rhyme(self) -> None:
62 self.remove_forced_good_item()
63
58 self.assertFalse(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall")) 64 self.assertFalse(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
59 65
60 self.collect_by_name("Starting Room - Rhyme Room Entrance") 66 self.collect_by_name("Starting Room - Rhyme Room Entrance")
@@ -64,6 +70,8 @@ class TestRequiredDoorLogic(LingoTestBase):
64 self.assertTrue(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall")) 70 self.assertTrue(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
65 71
66 def test_through_hidden(self) -> None: 72 def test_through_hidden(self) -> None:
73 self.remove_forced_good_item()
74
67 self.assertFalse(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall")) 75 self.assertFalse(self.can_reach_location("Rhyme Room - Circle/Looped Square Wall"))
68 76
69 self.collect_by_name("Starting Room - Rhyme Room Entrance") 77 self.collect_by_name("Starting Room - Rhyme Room Entrance")
@@ -83,6 +91,8 @@ class TestSimpleDoors(LingoTestBase):
83 } 91 }
84 92
85 def test_requirement(self): 93 def test_requirement(self):
94 self.remove_forced_good_item()
95
86 self.assertFalse(self.multiworld.state.can_reach("Outside The Wanderer", "Region", self.player)) 96 self.assertFalse(self.multiworld.state.can_reach("Outside The Wanderer", "Region", self.player))
87 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) 97 self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player))
88 98