Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
arnauddupuis committed Oct 19, 2020
1 parent a232df3 commit 97fd9c7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/test_actuators.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ def test_pathfinder_bfs(self):
npc.actuator = actuators.PathFinder(parent=npc, game=g, circle_waypoints=False)
with self.assertRaises(engine.base.PglInvalidTypeException):
actuators.PathFinder(
parent=npc,
game=g,
circle_waypoints=False,
algorithm="constants.ALGO_BFS"
)
parent=npc,
game=g,
circle_waypoints=False,
algorithm="constants.ALGO_BFS",
)
npc.actuator.set_destination(2, 2)
npc.actuator.find_path()
self.assertTrue(len(npc.actuator.current_path()) > 0)
Expand Down Expand Up @@ -164,21 +164,21 @@ def test_pathfinder_astar(self):
)
with self.assertRaises(engine.base.PglInvalidTypeException):
actuators.PathFinder(
parent=npc,
game=g,
circle_waypoints=False,
algorithm="constants.ALGO_ASTAR"
)
parent=npc,
game=g,
circle_waypoints=False,
algorithm="constants.ALGO_ASTAR",
)
npc.actuator.set_destination(2, 2)
npc.actuator.find_path()
self.assertTrue(len(npc.actuator.current_path()) > 0)

with self.assertRaises(engine.base.PglInvalidTypeException):
npc.actuator.set_destination("2", 2)
npc.actuator.actuated_object = None
with self.assertRaises(engine.base.PglException) as e:
npc.actuator.find_path()
self.assertEqual(e.error, "actuated_object is not defined")
self.assertEqual(e.error, "actuated_object is not defined")
npc.actuator.actuated_object = board_items.Door()
with self.assertRaises(engine.base.PglException) as e:
npc.actuator.find_path()
Expand Down

0 comments on commit 97fd9c7

Please sign in to comment.