Core: Allow running unit tests scoped to specific worlds (#6290)

This allows the unit tests to be run on specific worlds only, it works by using an environment variable AP_TEST_WORLDS which is a comma separated list of world directories.
This commit is contained in:
James White
2026-07-17 20:01:28 +02:00
committed by GitHub
parent c311685064
commit 9c80dc6257
31 changed files with 194 additions and 59 deletions
+2
View File
@@ -70,10 +70,12 @@ def setup_multiworld(worlds: list[type[World]] | type[World], steps: tuple[str,
class TestWebWorld(WebWorld):
__test__ = False # World subclass, not a test case; opt out of pytest.ini's python_classes = Test
tutorials = []
class TestWorld(World):
__test__ = False # World subclass, not a test case; opt out of pytest.ini's python_classes = Test
game = f"Test Game"
item_name_to_id = {}
location_name_to_id = {}