From 13e264b1ac1b3e437fb56f0f85f81a9e58c2efbb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Dec 2024 12:15:32 -0500 Subject: [PATCH] add 1Up Block tests --- worlds/sm64ex/test/test_options.py | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/worlds/sm64ex/test/test_options.py b/worlds/sm64ex/test/test_options.py index b34a6799b325..fb6732e7218e 100644 --- a/worlds/sm64ex/test/test_options.py +++ b/worlds/sm64ex/test/test_options.py @@ -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 = { @@ -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 = { @@ -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, @@ -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 = {