Skip to content

Commit

Permalink
add 1Up Block tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwhite committed Dec 12, 2024
1 parent dbd92e7 commit 13e264b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions worlds/sm64ex/test/test_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,32 @@ def test_items_in_coin_star_locations(self):
assert item_in_loc.name == "Power Star"
assert item_in_loc.player == self.world.player


# Exclamation Boxes
class ExclamationBoxesOnTestBase(SM64TestBase):
options = {
"exclamation_boxes": Options.ExclamationBoxes.option_true,
}

class ExclamationBoxesOffTestBase(SM64TestBase):
options = {
"exclamation_boxes": Options.ExclamationBoxes.option_false,
}

# Should populate the boxes with the players own 1Up Mushrooms
def test_items_in_exclamation_box_locations(self):
# Get 1Up Block locations
loc1ups_table = []
for loc in self.world.location_names:
if "1Up Block" in loc:
loc1ups_table.append(loc)

for loc in loc1ups_table:
item_in_loc = self.world.get_location(loc).item
assert item_in_loc.name == "1Up Mushroom"
assert item_in_loc.player == self.world.player


# Entrance Randomizer
class EntranceRandoOffTestBase(SM64TestBase):
options = {
Expand Down Expand Up @@ -104,6 +130,7 @@ def test_BitFS_entrance(self):
# BitFS does not go to DDD
assert self.world.area_connections[bitfs_level_id] != sm64_entrances_to_level["Dire, Dire Docks"]


# Completion Type
class CompletionLastBowserTestBase(SM64TestBase):
options = {
Expand All @@ -115,8 +142,12 @@ class CompletionAllBowserTestBase(SM64TestBase):
"completion_type": Options.CompletionType.option_All_Bowser_Stages
}



# Combinations


# Smallest Power Star count possible
class MinimumStarsPossibleTestBase(SM64TestBase):
options = {
"amount_of_stars": Options.AmountOfStars.range_start,
Expand All @@ -131,6 +162,7 @@ def test_stars_vs_filler(self):
star_count = len(self.get_items_by_name("Power Star"))
self.assertGreater(filler_count, star_count)


# Entrance + Move Rando
class CourseEntrancesMoveTestBase(SM64TestBase):
options = {
Expand Down

0 comments on commit 13e264b

Please sign in to comment.