mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00

* Ensure that included/starter songs only include those within enabled dlcs. * Allow filtering traps by trap instead of by category. * Add in the currently available limited time dlcs to the dlc list. * Add the option group to the webhost and cleanup some errors. * Fix trap list. * Update tests. Add new ones to test correctness of new features. * Remove the old Just As Planned option * Make traps order alphabetically. Also adjust the title for traps. * Adjust new lines to better fit the website. * Style fixes. * Test adjustments and a fix due to test no longer having just as planned dlc. * Undo spacing changes as it breaks yaml generation. * Fix indenting in webhost. * Add the old options in as removed. Also clean up unused import. * Remove references to the old allow_just_as_planned_dlc_songs option in Muse Dash tests. * Add newline to end of file. --------- Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
34 lines
1.4 KiB
Python
34 lines
1.4 KiB
Python
from . import MuseDashTestBase
|
|
|
|
|
|
class TestNoTraps(MuseDashTestBase):
|
|
def test_no_traps(self) -> None:
|
|
md_world = self.get_world()
|
|
md_world.options.chosen_traps.value.clear()
|
|
self.assertEqual(len(md_world.get_available_traps()), 0, "Got an available trap when we expected none.")
|
|
|
|
def test_all_traps(self) -> None:
|
|
md_world = self.get_world()
|
|
md_world.options.dlc_packs.value.add(md_world.md_collection.MUSE_PLUS_DLC)
|
|
|
|
for trap in md_world.md_collection.trap_items.keys():
|
|
md_world.options.chosen_traps.value.add(trap)
|
|
|
|
trap_count = len(md_world.get_available_traps())
|
|
true_count = len(md_world.md_collection.trap_items.keys())
|
|
|
|
self.assertEqual(trap_count, true_count, "Got a different amount of traps than what was expected.")
|
|
|
|
def test_exclude_sfx_traps(self) -> None:
|
|
md_world = self.get_world()
|
|
if "Muse Plus" in md_world.options.dlc_packs.value:
|
|
md_world.options.dlc_packs.value.remove("Muse Plus")
|
|
|
|
for trap in md_world.md_collection.trap_items.keys():
|
|
md_world.options.chosen_traps.value.add(trap)
|
|
|
|
trap_count = len(md_world.get_available_traps())
|
|
true_count = len(md_world.md_collection.trap_items.keys()) - len(md_world.md_collection.sfx_trap_items)
|
|
|
|
self.assertEqual(trap_count, true_count, "Got a different amount of traps than what was expected.")
|