From 2d589f74cd2dbcb11528272cba9f6bab5cca8475 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Mon, 15 Jan 2024 20:50:16 +0100 Subject: [PATCH] Tests: test that World.options is not set on the class (#2725) Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> --- test/general/test_options.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/general/test_options.py b/test/general/test_options.py index e1136f93c96f..211704dfe6ba 100644 --- a/test/general/test_options.py +++ b/test/general/test_options.py @@ -10,3 +10,10 @@ def test_options_have_doc_string(self): for option_key, option in world_type.options_dataclass.type_hints.items(): with self.subTest(game=gamename, option=option_key): self.assertTrue(option.__doc__) + + def test_options_are_not_set_by_world(self): + """Test that options attribute is not already set""" + for gamename, world_type in AutoWorldRegister.world_types.items(): + with self.subTest(game=gamename): + self.assertFalse(hasattr(world_type, "options"), + f"Unexpected assignment to {world_type.__name__}.options!")