Skip to content

Commit

Permalink
Tests: test that World.options is not set on the class (ArchipelagoMW…
Browse files Browse the repository at this point in the history
…#2725)

Co-authored-by: black-sliver <[email protected]>
  • Loading branch information
2 people authored and Jouramie committed Feb 28, 2024
1 parent 00d850a commit 2d589f7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/general/test_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!")

0 comments on commit 2d589f7

Please sign in to comment.