Skip to content

Commit

Permalink
SoE: pep up test naming
Browse files Browse the repository at this point in the history
  • Loading branch information
black-sliver committed Jan 10, 2024
1 parent ee792eb commit defe144
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions worlds/soe/test/test_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class AccessTest(SoETestBase):
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):
def test_bronze_axe(self):
gourds = {
"Pyramid bottom": (118, 121, 122, 123, 124, 125),
"Pyramid top": (140,)
Expand All @@ -16,7 +16,7 @@ def testBronzeAxe(self):
items = [["Bronze Axe"]]
self.assertAccessDependency(locations, items)

def testBronzeSpearPlus(self):
def test_bronze_spear_plus(self):
locations = ["Megataur"]
items = [["Bronze Spear"], ["Lance (Weapon)"], ["Laser Lance"]]
self.assertAccessDependency(locations, items)
12 changes: 6 additions & 6 deletions worlds/soe/test/test_goal.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TestFragmentGoal(SoETestBase):
"required_fragments": 20,
}

def testFragments(self):
def test_fragments(self):
self.collect_by_name(["Gladiator Sword", "Diamond Eye", "Wheel", "Gauge"])
self.assertBeatable(False) # 0 fragments
fragments = self.get_items_by_name("Energy Core Fragment")
Expand All @@ -24,11 +24,11 @@ def testFragments(self):
self.assertEqual(self.count("Energy Core Fragment"), 21)
self.assertBeatable(True)

def testNoWeapon(self):
def test_no_weapon(self):
self.collect_by_name(["Diamond Eye", "Wheel", "Gauge", "Energy Core Fragment"])
self.assertBeatable(False)

def testNoRocket(self):
def test_no_rocket(self):
self.collect_by_name(["Gladiator Sword", "Diamond Eye", "Wheel", "Energy Core Fragment"])
self.assertBeatable(False)

Expand All @@ -38,16 +38,16 @@ class TestShuffleGoal(SoETestBase):
"energy_core": "shuffle",
}

def testCore(self):
def test_core(self):
self.collect_by_name(["Gladiator Sword", "Diamond Eye", "Wheel", "Gauge"])
self.assertBeatable(False)
self.collect_by_name(["Energy Core"])
self.assertBeatable(True)

def testNoWeapon(self):
def test_no_weapon(self):
self.collect_by_name(["Diamond Eye", "Wheel", "Gauge", "Energy Core"])
self.assertBeatable(False)

def testNoRocket(self):
def test_no_rocket(self):
self.collect_by_name(["Gladiator Sword", "Diamond Eye", "Wheel", "Energy Core"])
self.assertBeatable(False)
4 changes: 2 additions & 2 deletions worlds/soe/test/test_oob.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class OoBTest(SoETestBase):
"""Tests that 'on' doesn't put out-of-bounds in logic. This is also the test base for OoB in logic."""
options: typing.Dict[str, typing.Any] = {"out_of_bounds": "on"}

def testOoBAccess(self):
def test_oob_access(self):
in_logic = self.options["out_of_bounds"] == "logic"

# some locations that just need a weapon + OoB
Expand Down Expand Up @@ -37,7 +37,7 @@ def testOoBAccess(self):
self.collect_by_name("Diamond Eye")
self.assertLocationReachability(reachable=de_reachable, unreachable=de_unreachable, satisfied=in_logic)

def testOoBGoal(self):
def test_oob_goal(self):
# still need Energy Core with OoB if sequence breaks are not in logic
for item in ["Gladiator Sword", "Diamond Eye", "Wheel", "Gauge"]:
self.collect_by_name(item)
Expand Down
4 changes: 2 additions & 2 deletions worlds/soe/test/test_sequence_breaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class SequenceBreaksTest(SoETestBase):
"""Tests that 'on' doesn't put sequence breaks in logic. This is also the test base for in-logic."""
options: typing.Dict[str, typing.Any] = {"sequence_breaks": "on"}

def testSequenceBreaksAccess(self):
def test_sequence_breaks_access(self):
in_logic = self.options["sequence_breaks"] == "logic"

# some locations that just need any weapon + sequence break
Expand All @@ -30,7 +30,7 @@ def testSequenceBreaksAccess(self):
self.collect_by_name("Bronze Spear") # Escape now just needs either Megataur or Rimsala dead
self.assertEqual(self.can_reach_location("Escape"), in_logic)

def testSequenceBreaksGoal(self):
def test_sequence_breaks_goal(self):
in_logic = self.options["sequence_breaks"] == "logic"

# don't need Energy Core with sequence breaks in logic
Expand Down

0 comments on commit defe144

Please sign in to comment.