diff --git a/test/bases.py b/test/bases.py index 5fe4df2014c1..16b7c8a79008 100644 --- a/test/bases.py +++ b/test/bases.py @@ -301,6 +301,7 @@ def fulfills_accessibility() -> bool: return self.multiworld.has_beaten_game(state, 1) with self.subTest("Game", game=self.game, seed=self.multiworld.seed): + self.multiworld.update_itempool() distribute_items_restrictive(self.multiworld) call_all(self.multiworld, "post_fill") self.assertTrue(fulfills_accessibility(), "Collected all locations, but can't beat the game.") diff --git a/test/general/test_items.py b/test/general/test_items.py index 464d246e1fa3..590411dff8fe 100644 --- a/test/general/test_items.py +++ b/test/general/test_items.py @@ -1,5 +1,5 @@ import unittest -from worlds.AutoWorld import AutoWorldRegister +from worlds.AutoWorld import AutoWorldRegister, call_all from . import setup_solo_multiworld @@ -47,6 +47,9 @@ def test_item_count_greater_equal_locations(self): for game_name, world_type in AutoWorldRegister.world_types.items(): with self.subTest("Game", game=game_name): multiworld = setup_solo_multiworld(world_type) + call_all(multiworld, "create_filler_items", + {1: len(multiworld.get_unfilled_locations(1)) - len(multiworld.itempool)}) + multiworld.update_itempool() self.assertGreaterEqual( len(multiworld.itempool), len(multiworld.get_unfilled_locations()), diff --git a/worlds/messenger/test/test_shop.py b/worlds/messenger/test/test_shop.py index bfd3b417a875..ffc74b0c72b8 100644 --- a/worlds/messenger/test/test_shop.py +++ b/worlds/messenger/test/test_shop.py @@ -1,4 +1,4 @@ -from typing import Dict +from typing import Dict, Optional from . import MessengerTestBase from ..shop import SHOP_ITEMS, FIGURINES @@ -10,6 +10,12 @@ class ShopCostTest(MessengerTestBase): "shuffle_shards": "true", } + def world_setup(self, seed: Optional[int] = None) -> None: + super().world_setup(seed) + self.multiworld.worlds[self.player].create_filler_items( + len(self.multiworld.get_unfilled_locations()) - len(self.multiworld.itempool)) + self.multiworld.update_itempool() + def test_shop_rules(self) -> None: for loc in SHOP_ITEMS: loc = f"The Shop - {loc}" @@ -69,7 +75,7 @@ def test_strike(self) -> None: pass -class PlandoTest(MessengerTestBase): +class PlandoTest(ShopCostTest): options = { "shop_price_plan": { "Karuta Plates": 50, @@ -109,3 +115,6 @@ def test_costs(self) -> None: self.assertLessEqual(price, self.multiworld.get_location(loc, self.player).cost) self.assertTrue(loc in FIGURINES) self.assertEqual(len(figures), len(FIGURINES)) + + def test_dboost(self) -> None: + pass