From 6220963195c5b12edea12d46057a657cc5f73f64 Mon Sep 17 00:00:00 2001 From: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Date: Mon, 13 Jan 2025 18:35:44 -0500 Subject: [PATCH] Tests: No Creating Items/Locations/Regions in __init__ (#4474) --- test/general/test_implemented.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/general/test_implemented.py b/test/general/test_implemented.py index 756cfa8b..7abf9959 100644 --- a/test/general/test_implemented.py +++ b/test/general/test_implemented.py @@ -117,3 +117,12 @@ class TestImplemented(unittest.TestCase): f"\nUnexpectedly reachable locations in sphere {sphere_num}:" f"\n{reachable_only_with_explicit}") self.fail("Unreachable") + + def test_no_items_or_locations_or_regions_submitted_in_init(self): + """Test that worlds don't submit items/locations/regions to the multiworld in __init__""" + for game_name, world_type in AutoWorldRegister.world_types.items(): + with self.subTest("Game", game=game_name): + multiworld = setup_solo_multiworld(world_type, ()) + self.assertEqual(len(multiworld.itempool), 0) + self.assertEqual(len(multiworld.get_locations()), 0) + self.assertEqual(len(multiworld.get_regions()), 0)