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 19:01:28 +01:00
committed by GitHub
parent c311685064
commit 9c80dc6257
31 changed files with 194 additions and 59 deletions
+3 -2
View File
@@ -65,13 +65,14 @@ class TestAllGamesMultiworld(MultiworldTestBase):
self.assertTrue(self.fulfills_accessibility(), "Collected all locations, but can't beat the game")
@classvar_matrix(game=AutoWorldRegister.world_types.keys())
@classvar_matrix(game=AutoWorldRegister.testable_worlds.keys())
class TestTwoPlayerMulti(MultiworldTestBase):
world_relevant = True
game: ClassVar[str]
def test_two_player_single_game_fills(self) -> None:
"""Tests that a multiworld of two players for each registered game world can generate."""
world_type = AutoWorldRegister.world_types[self.game]
world_type = AutoWorldRegister.testable_worlds[self.game]
self.multiworld = setup_multiworld([world_type, world_type], ())
for world in self.multiworld.worlds.values():
world.options.accessibility.value = Accessibility.option_full