Core, Tests: allow Archipelago items in all worlds (#5893)

This commit is contained in:
black-sliver
2026-02-05 07:56:25 +00:00
committed by GitHub
parent 6adeb8b95e
commit 1dd91ec85b

View File

@@ -1,5 +1,6 @@
import unittest import unittest
from argparse import Namespace from argparse import Namespace
from collections import ChainMap
from typing import Type from typing import Type
from BaseClasses import CollectionState, MultiWorld from BaseClasses import CollectionState, MultiWorld
@@ -82,12 +83,13 @@ class TestBase(unittest.TestCase):
def test_items_in_datapackage(self): def test_items_in_datapackage(self):
"""Test that any created items in the itempool are in the datapackage""" """Test that any created items in the itempool are in the datapackage"""
archipelago = AutoWorldRegister.world_types["Archipelago"]
for game_name, world_type in AutoWorldRegister.world_types.items(): for game_name, world_type in AutoWorldRegister.world_types.items():
with self.subTest("Game", game=game_name): with self.subTest("Game", game=game_name):
multiworld = setup_solo_multiworld(world_type) multiworld = setup_solo_multiworld(world_type)
for item in multiworld.itempool: for item in multiworld.itempool:
self.assertIn(item.name, world_type.item_name_to_id) self.assertIn(item.name, ChainMap(world_type.item_name_to_id, archipelago.item_name_to_id))
def test_item_links(self) -> None: def test_item_links(self) -> None:
""" """
Tests item link creation by creating a multiworld of 2 worlds for every game and linking their items together. Tests item link creation by creating a multiworld of 2 worlds for every game and linking their items together.