Skip to content

Commit

Permalink
add tests for suitless logic, and other test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ixrec committed May 19, 2024
1 parent b72e3c5 commit 6c04a85
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions worlds/outer_wilds/test/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import List

from test.bases import WorldTestBase, CollectionState
from ..Options import Goal


class OuterWildsTestBase(WorldTestBase):
Expand Down Expand Up @@ -79,7 +80,7 @@ def test_all_worlds(self) -> None:
# for now, we create the Victory events unconditionally, and the Goal
# setting only changes which one is used in the completion_condition,
# so these "go mode" tests pass regardless of the Goal setting
self.assertTrue(self.makeStateWith([
self.assertRequiresAllOf("Victory - Song of Five", [
"Spacesuit",
"Launch Codes",
"Nomai Warp Codes",
Expand All @@ -90,9 +91,9 @@ def test_all_worlds(self) -> None:
"Escape Pod 3 Signal",
"Scout",
"Coordinates"
]).can_reach("Victory - Song of Five", "Location", 1))
])

self.assertFalse(self.makeStateWith([
self.assertNotReachableWith("Victory - Song of Six", [
"Spacesuit",
"Launch Codes",
"Nomai Warp Codes",
Expand All @@ -103,9 +104,9 @@ def test_all_worlds(self) -> None:
"Escape Pod 3 Signal",
"Scout",
"Coordinates"
]).can_reach("Victory - Song of Six", "Location", 1))
])

self.assertTrue(self.makeStateWith([
self.assertRequiresAllOf("Victory - Song of Six", [
"Spacesuit",
"Launch Codes",
"Nomai Warp Codes",
Expand All @@ -120,7 +121,7 @@ def test_all_worlds(self) -> None:
"Imaging Rule",
"Shrine Door Codes",
"Entanglement Rule"
]).can_reach("Victory - Song of Six", "Location", 1))
])


class TestDefaultWorld(OuterWildsTestBase):
Expand Down Expand Up @@ -156,7 +157,7 @@ def test_default_world(self):

class TestSongOfSixWorld(OuterWildsTestBase):
options = {
"goal": 1
"goal": Goal.option_song_of_six
}

def test_six_world(self):
Expand Down Expand Up @@ -208,3 +209,31 @@ def test_logsanity_world(self):

self.assertNotReachableWith("GD: Bramble Island Fuel Tank", [])
self.assertReachableWith("GD: Bramble Island Fuel Tank", ["Ghost Matter Wavelength"])


class TestSuitlessWorld(OuterWildsTestBase):
options = {
"shuffle_spacesuit": "true",
"logsanity": "true"
}


class TestSuitlessSongOfSixWorld(OuterWildsTestBase):
options = {
"shuffle_spacesuit": "true",
"logsanity": "true",
"goal": Goal.option_song_of_six
}


class TestSuitlessLogsanityWorld(OuterWildsTestBase):
options = {
"shuffle_spacesuit": "true"
}


class TestSuitlessLogsanitySongOfSixWorld(OuterWildsTestBase):
options = {
"shuffle_spacesuit": "true",
"goal": Goal.option_song_of_six
}

0 comments on commit 6c04a85

Please sign in to comment.