Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Add a test that worlds can create filler without generation steps #2073

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/general/TestItems.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import unittest

from BaseClasses import Item
from worlds.AutoWorld import AutoWorldRegister
from . import setup_solo_multiworld

Expand All @@ -11,6 +13,13 @@ def testCreateItem(self):
with self.subTest("Create Item", item_name=item_name, game_name=game_name):
item = proxy_world.create_item(item_name)
self.assertEqual(item.name, item_name)

def testCreateFiller(self):
for game_name, world_type in AutoWorldRegister.world_types.items():
if world_type.item_name_to_id:
world = setup_solo_multiworld(world_type, ()).worlds[1]
with self.subTest("Create Filler", game_name=game_name):
self.assertIsInstance(world.create_filler(), Item)

def testItemNameGroupHasValidItem(self):
"""Test that all item name groups contain valid items. """
Expand Down