diff --git a/tests/test_game.py b/tests/test_game.py index c7b3e4c..5a75fa4 100644 --- a/tests/test_game.py +++ b/tests/test_game.py @@ -844,7 +844,7 @@ def test_adding_rail_resets_signal_blocks( assert len(game.signal_controller._signal_blocks) == 3 - game.grid.create_rail([Rail(30, 0, 60, 0), Rail(60, 0, 90, 0)]) + game.grid.create_rail({Rail(30, 0, 60, 0), Rail(60, 0, 90, 0)}) assert len(game.signal_controller._signal_blocks) == 2 diff --git a/tests/util.py b/tests/util.py index ce6f27a..f17cd50 100644 --- a/tests/util.py +++ b/tests/util.py @@ -31,19 +31,19 @@ def _create_rails(grid: Grid, lines: list[str]): if character in "-h": x1, y1 = _coordinates(row_number, column_number - 1) x2, y2 = _coordinates(row_number, column_number + 1) - grid.create_rail([Rail(x1, y1, x2, y2)]) + grid.create_rail({Rail(x1, y1, x2, y2)}) elif character in "|v": x1, y1 = _coordinates(row_number - 1, column_number) x2, y2 = _coordinates(row_number + 1, column_number) - grid.create_rail([Rail(x1, y1, x2, y2)]) + grid.create_rail({Rail(x1, y1, x2, y2)}) elif character == "/": x1, y1 = _coordinates(row_number - 1, column_number - 1) x2, y2 = _coordinates(row_number + 1, column_number + 1) - grid.create_rail([Rail(x1, y1, x2, y2)]) + grid.create_rail({Rail(x1, y1, x2, y2)}) elif character == "\\": x1, y1 = _coordinates(row_number - 1, column_number + 1) x2, y2 = _coordinates(row_number + 1, column_number - 1) - grid.create_rail([Rail(x1, y1, x2, y2)]) + grid.create_rail({Rail(x1, y1, x2, y2)}) if character in "hv": grid.create_signals_at_grid_position(abs(x1 + x2) / 2, abs(y1 + y2) / 2) @@ -58,7 +58,7 @@ def _remove_offset(lines: Iterable[str]): def create_station_method(grid: Grid, east_west: bool) -> Callable[[Vec2], None]: def inner(position: Vec2): - grid._create_station(Station(positions=(position,), east_west=east_west)), + grid._create_station(Station(positions=(position,), east_west=east_west)) return inner