mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
core: clarify usage of classmethods in World class (#1449)
This commit is contained in:
@@ -22,3 +22,12 @@ class TestImplemented(unittest.TestCase):
|
||||
for region in multiworld.regions:
|
||||
for exit in region.exits:
|
||||
self.assertEqual(exit.parent_region, region)
|
||||
|
||||
def testStageMethods(self):
|
||||
"""Tests that worlds don't try to implement certain steps that are only ever called as stage."""
|
||||
for game_name, world_type in AutoWorldRegister.world_types.items():
|
||||
if not world_type.hidden:
|
||||
with self.subTest(game_name):
|
||||
for method in ("assert_generate",):
|
||||
self.assertFalse(hasattr(world_type, method),
|
||||
f"{method} must be implemented as a @classmethod named stage_{method}.")
|
||||
|
Reference in New Issue
Block a user