Tests: add can_reach_region method to WorldTestBase (#2274)

This commit is contained in:
Aaron Wagener 2023-10-08 04:46:30 -05:00 committed by GitHub
parent 5591879547
commit fd93f6e722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -189,12 +189,16 @@ class WorldTestBase(unittest.TestCase):
self.multiworld.state.remove(item)
def can_reach_location(self, location: str) -> bool:
"""Determines if the current state can reach the provide location name"""
"""Determines if the current state can reach the provided location name"""
return self.multiworld.state.can_reach(location, "Location", 1)
def can_reach_entrance(self, entrance: str) -> bool:
"""Determines if the current state can reach the provided entrance name"""
return self.multiworld.state.can_reach(entrance, "Entrance", 1)
def can_reach_region(self, region: str) -> bool:
"""Determines if the current state can reach the provided region name"""
return self.multiworld.state.can_reach(region, "Region", 1)
def count(self, item_name: str) -> int:
"""Returns the amount of an item currently in state"""