Skip to content

Commit

Permalink
Simplify test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Godsmith committed Aug 27, 2023
1 parent 6339851 commit 07c17f5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/test_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,20 +788,15 @@ def test_train_chooses_green_route(self, game: Game):
game,
r"""
.-.-.-.-.-.
| |
S-.-S-S-.-S
v v
Sh.-S-S-.hS
M . M F . F
""",
)
stations = list(game.grid.stations.values())
game._create_train(stations[1], stations[2])
game.create_signals_at_click_position(30, 45) # right of leftmost station
game.create_signals_at_click_position(150, 45) # left of rightmost station
game.create_signals_at_click_position(15, 60) # leftmost NS rail
game.create_signals_at_click_position(165, 60) # rightmost NS rail
train = game._create_train(stations[0], stations[3])
game._create_train(stations[1], stations[2])

# Needs two updates because in the first update the train reaches the first
# station, and in the second update it begins to move.
Expand Down

0 comments on commit 07c17f5

Please sign in to comment.