Stardew Valley: add assert_can_reach_region_* for better tests (#4556)
* add assert_reach_region_*; refactor existing assert_reach_location_* to allow string * rename asserts
This commit is contained in:
@@ -39,10 +39,10 @@ class TestSkillProgressionProgressive(SVTestBase):
|
||||
|
||||
with self.subTest(location_name):
|
||||
if level > 1:
|
||||
self.assert_reach_location_false(location, self.multiworld.state)
|
||||
self.assert_cannot_reach_location(location, self.multiworld.state)
|
||||
self.collect(f"{skill} Level")
|
||||
|
||||
self.assert_reach_location_true(location, self.multiworld.state)
|
||||
self.assert_can_reach_location(location, self.multiworld.state)
|
||||
|
||||
self.reset_collection_state()
|
||||
|
||||
@@ -88,7 +88,7 @@ class TestSkillProgressionProgressiveWithMasteryWithoutMods(SVTestBase):
|
||||
for skill in all_vanilla_skills:
|
||||
with self.subTest(skill):
|
||||
location = self.multiworld.get_location(f"{skill} Mastery", self.player)
|
||||
self.assert_reach_location_true(location, self.multiworld.state)
|
||||
self.assert_can_reach_location(location, self.multiworld.state)
|
||||
|
||||
self.reset_collection_state()
|
||||
|
||||
@@ -99,7 +99,7 @@ class TestSkillProgressionProgressiveWithMasteryWithoutMods(SVTestBase):
|
||||
self.remove_one_by_name(f"{skill} Level")
|
||||
|
||||
location = self.multiworld.get_location(f"{skill} Mastery", self.player)
|
||||
self.assert_reach_location_false(location, self.multiworld.state)
|
||||
self.assert_cannot_reach_location(location, self.multiworld.state)
|
||||
|
||||
self.reset_collection_state()
|
||||
|
||||
@@ -108,6 +108,6 @@ class TestSkillProgressionProgressiveWithMasteryWithoutMods(SVTestBase):
|
||||
|
||||
self.remove_one_by_name(f"Progressive Pickaxe")
|
||||
location = self.multiworld.get_location("Mining Mastery", self.player)
|
||||
self.assert_reach_location_false(location, self.multiworld.state)
|
||||
self.assert_cannot_reach_location(location, self.multiworld.state)
|
||||
|
||||
self.reset_collection_state()
|
||||
|
||||
Reference in New Issue
Block a user