Tests: world test base class (#1116)

* world test base class

* game not instance property

* I would have guessed that this only collected 1.

* game property

* move SoE tests into worlds

* don't force auto world setup
This commit is contained in:
Doug Hoskisson
2022-10-18 09:54:41 -07:00
committed by GitHub
parent 49ae79e5ce
commit f12b73f487
8 changed files with 39 additions and 15 deletions

View File

@@ -0,0 +1,22 @@
import typing
from . import SoETestBase
class AccessTest(SoETestBase):
@staticmethod
def _resolveGourds(gourds: typing.Dict[str, typing.Iterable[int]]):
return [f"{name} #{number}" for name, numbers in gourds.items() for number in numbers]
def testBronzeAxe(self):
gourds = {
"Pyramid bottom": (118, 121, 122, 123, 124, 125),
"Pyramid top": (140,)
}
locations = ["Rimsala"] + self._resolveGourds(gourds)
items = [["Bronze Axe"]]
self.assertAccessDependency(locations, items)
def testBronzeSpearPlus(self):
locations = ["Megataur"]
items = [["Bronze Spear"], ["Lance (Weapon)"], ["Laser Lance"]]
self.assertAccessDependency(locations, items)