Tests: give seed on default tests and fix execnet error (#3520)

* output seed of default tests

* test execnet fix

* try failing with interpolated string

* Update bases.py

* try without tryexcept

* Update bases.py

* Update bases.py

* remove fake exception

* fix indent

* actually fix the execnet issue

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
This commit is contained in:
Silvris 2024-06-22 14:00:15 -05:00 committed by GitHub
parent 60a26920e1
commit 5ca31533dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -292,12 +292,12 @@ class WorldTestBase(unittest.TestCase):
"""Ensure all state can reach everything and complete the game with the defined options""" """Ensure all state can reach everything and complete the game with the defined options"""
if not (self.run_default_tests and self.constructed): if not (self.run_default_tests and self.constructed):
return return
with self.subTest("Game", game=self.game): with self.subTest("Game", game=self.game, seed=self.multiworld.seed):
excluded = self.multiworld.worlds[self.player].options.exclude_locations.value excluded = self.multiworld.worlds[self.player].options.exclude_locations.value
state = self.multiworld.get_all_state(False) state = self.multiworld.get_all_state(False)
for location in self.multiworld.get_locations(): for location in self.multiworld.get_locations():
if location.name not in excluded: if location.name not in excluded:
with self.subTest("Location should be reached", location=location): with self.subTest("Location should be reached", location=location.name):
reachable = location.can_reach(state) reachable = location.can_reach(state)
self.assertTrue(reachable, f"{location.name} unreachable") self.assertTrue(reachable, f"{location.name} unreachable")
with self.subTest("Beatable"): with self.subTest("Beatable"):
@ -308,7 +308,7 @@ class WorldTestBase(unittest.TestCase):
"""Ensure empty state can reach at least one location with the defined options""" """Ensure empty state can reach at least one location with the defined options"""
if not (self.run_default_tests and self.constructed): if not (self.run_default_tests and self.constructed):
return return
with self.subTest("Game", game=self.game): with self.subTest("Game", game=self.game, seed=self.multiworld.seed):
state = CollectionState(self.multiworld) state = CollectionState(self.multiworld)
locations = self.multiworld.get_reachable_locations(state, self.player) locations = self.multiworld.get_reachable_locations(state, self.player)
self.assertGreater(len(locations), 0, self.assertGreater(len(locations), 0,