diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/TestDoors.py | 10 | ||||
-rw-r--r-- | test/TestOrangeTower.py | 4 | ||||
-rw-r--r-- | test/TestProgressive.py | 6 | ||||
-rw-r--r-- | test/__init__.py | 8 |
4 files changed, 26 insertions, 2 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 | ||
diff --git a/test/TestOrangeTower.py b/test/TestOrangeTower.py index 7b0c3bb..9170de1 100644 --- a/test/TestOrangeTower.py +++ b/test/TestOrangeTower.py | |||
@@ -8,6 +8,8 @@ class TestProgressiveOrangeTower(LingoTestBase): | |||
8 | } | 8 | } |
9 | 9 | ||
10 | def test_from_welcome_back(self) -> None: | 10 | def test_from_welcome_back(self) -> None: |
11 | self.remove_forced_good_item() | ||
12 | |||
11 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player)) | 13 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player)) |
12 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player)) | 14 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player)) |
13 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) | 15 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) |
@@ -83,6 +85,8 @@ class TestProgressiveOrangeTower(LingoTestBase): | |||
83 | self.assertTrue(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player)) | 85 | self.assertTrue(self.multiworld.state.can_reach("Orange Tower Seventh Floor", "Region", self.player)) |
84 | 86 | ||
85 | def test_from_hub_room(self) -> None: | 87 | def test_from_hub_room(self) -> None: |
88 | self.remove_forced_good_item() | ||
89 | |||
86 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player)) | 90 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower First Floor", "Region", self.player)) |
87 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player)) | 91 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Second Floor", "Region", self.player)) |
88 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) | 92 | self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) |
diff --git a/test/TestProgressive.py b/test/TestProgressive.py index 917c6e7..8edc7ce 100644 --- a/test/TestProgressive.py +++ b/test/TestProgressive.py | |||
@@ -7,6 +7,8 @@ class TestComplexProgressiveHallwayRoom(LingoTestBase): | |||
7 | } | 7 | } |
8 | 8 | ||
9 | def test_item(self): | 9 | def test_item(self): |
10 | self.remove_forced_good_item() | ||
11 | |||
10 | self.assertFalse(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | 12 | self.assertFalse(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) |
11 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | 13 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) |
12 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | 14 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) |
@@ -58,6 +60,8 @@ class TestSimpleHallwayRoom(LingoTestBase): | |||
58 | } | 60 | } |
59 | 61 | ||
60 | def test_item(self): | 62 | def test_item(self): |
63 | self.remove_forced_good_item() | ||
64 | |||
61 | self.assertFalse(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) | 65 | self.assertFalse(self.multiworld.state.can_reach("Outside The Agreeable", "Region", self.player)) |
62 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) | 66 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (2)", "Region", self.player)) |
63 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) | 67 | self.assertFalse(self.multiworld.state.can_reach("Hallway Room (3)", "Region", self.player)) |
@@ -86,6 +90,8 @@ class TestProgressiveArtGallery(LingoTestBase): | |||
86 | } | 90 | } |
87 | 91 | ||
88 | def test_item(self): | 92 | def test_item(self): |
93 | self.remove_forced_good_item() | ||
94 | |||
89 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) | 95 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery", "Region", self.player)) |
90 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) | 96 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Second Floor)", "Region", self.player)) |
91 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) | 97 | self.assertFalse(self.multiworld.state.can_reach("Art Gallery (Third Floor)", "Region", self.player)) |
diff --git a/test/__init__.py b/test/__init__.py index ffbf903..7ff456d 100644 --- a/test/__init__.py +++ b/test/__init__.py | |||
@@ -1,7 +1,6 @@ | |||
1 | from typing import ClassVar | 1 | from typing import ClassVar |
2 | 2 | ||
3 | from test.bases import WorldTestBase | 3 | from test.bases import WorldTestBase |
4 | from .. import LingoTestOptions | ||
5 | 4 | ||
6 | 5 | ||
7 | class LingoTestBase(WorldTestBase): | 6 | class LingoTestBase(WorldTestBase): |
@@ -9,5 +8,10 @@ class LingoTestBase(WorldTestBase): | |||
9 | player: ClassVar[int] = 1 | 8 | player: ClassVar[int] = 1 |
10 | 9 | ||
11 | def world_setup(self, *args, **kwargs): | 10 | def world_setup(self, *args, **kwargs): |
12 | LingoTestOptions.disable_forced_good_item = True | ||
13 | super().world_setup(*args, **kwargs) | 11 | super().world_setup(*args, **kwargs) |
12 | |||
13 | def remove_forced_good_item(self): | ||
14 | location = self.multiworld.get_location("Second Room - Good Luck", self.player) | ||
15 | self.remove(location.item) | ||
16 | self.multiworld.itempool.append(location.item) | ||
17 | self.multiworld.state.events.add(location) | ||