From 044e273745fee5f19132af5147df2fc2b4ec14f5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Dec 2024 21:06:31 -0500 Subject: [PATCH] i didnt snake case again haha --- worlds/sm64ex/test/TestOptions.py | 23 ------------- worlds/sm64ex/test/test_options.py | 53 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 23 deletions(-) delete mode 100644 worlds/sm64ex/test/TestOptions.py create mode 100644 worlds/sm64ex/test/test_options.py diff --git a/worlds/sm64ex/test/TestOptions.py b/worlds/sm64ex/test/TestOptions.py deleted file mode 100644 index a26ddee0c41c..000000000000 --- a/worlds/sm64ex/test/TestOptions.py +++ /dev/null @@ -1,23 +0,0 @@ -from . import SM64TestBase -from .. import Options - -# Completion Types -class CompletionLastBowserTestBase(SM64TestBase): - options = { - "completion_type": Options.CompletionType.option_Last_Bowser_Stage - } - -class CompletionAllBowserTestBase(SM64TestBase): - options = { - "completion_type": Options.CompletionType.option_All_Bowser_Stages - } - -# Combinations - -class MinimumStarsPossibleTestBase(SM64TestBase): - options = { - "amount_of_stars": Options.AmountOfStars.range_start, - "enable_move_rando": Options.EnableMoveRandomizer.option_true, - "exclamation_boxes": Options.ExclamationBoxes.option_false, - "enable_coin_stars": Options.EnableCoinStars.option_false - } \ No newline at end of file diff --git a/worlds/sm64ex/test/test_options.py b/worlds/sm64ex/test/test_options.py new file mode 100644 index 000000000000..684faac711bf --- /dev/null +++ b/worlds/sm64ex/test/test_options.py @@ -0,0 +1,53 @@ +from . import SM64TestBase +from .. import Options +from ..Locations import loc100Coin_table + +class DefaultTestBase(SM64TestBase): + options = {} + +# Enable Coin Stars +class EnableCoinStarsTestBase(SM64TestBase): + options = { + "enable_coin_stars": Options.EnableCoinStars.option_true + } + + # Ensure Coin Star locations are created + def test_coin_star_locations(self): + for loc in loc100Coin_table: + assert loc in self.world.location_names + +class DisableCoinStarsTestBase(SM64TestBase): + options = { + "enable_coin_stars": Options.EnableCoinStars.option_false + } + + # Ensure Coin Star locations are not created + def test_coin_star_locations(self): + for loc in self.multiworld.get_locations(): + assert loc not in loc100Coin_table + +# Completion Type +class CompletionLastBowserTestBase(SM64TestBase): + options = { + "completion_type": Options.CompletionType.option_Last_Bowser_Stage + } + +class CompletionAllBowserTestBase(SM64TestBase): + options = { + "completion_type": Options.CompletionType.option_All_Bowser_Stages + } + +# Combinations +class MinimumStarsPossibleTestBase(SM64TestBase): + options = { + "amount_of_stars": Options.AmountOfStars.range_start, + "enable_move_rando": Options.EnableMoveRandomizer.option_true, + "exclamation_boxes": Options.ExclamationBoxes.option_false, + "enable_coin_stars": Options.EnableCoinStars.option_false + } + + # There will be less Power Stars than filler with this low of a star count + def test_stars_vs_filler(self): + filler_count = len(self.get_items_by_name("1Up Mushroom")) + star_count = len(self.get_items_by_name("Power Star")) + self.assertGreater(filler_count, star_count) \ No newline at end of file