Skip to content

Commit

Permalink
Issue #83: add second placement tag test.
Browse files Browse the repository at this point in the history
  • Loading branch information
enzet committed Nov 7, 2021
1 parent 059ffa2 commit 11596c4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/test_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@
{"lanes": "3", "placement": "right_of:1"}, # or placement=left_of:2
]

PLACEMENT_FEATURES_2: list[dict[str, str]] = [
{"lanes": "2"},
# or placement:backward=left_of:1
{"lanes": "3", "placement:forward": "left_of:1"},
{"lanes": "3", "placement": "transition"},
{"lanes": "4", "placement:backward": "middle_of:1"},
{"lanes": "3"},
]


class Grid:
"""Creating map with elements ordered in grid."""
Expand Down Expand Up @@ -200,5 +209,7 @@ def draw(
Path("out") / "width.svg",
)
road_features(
ROAD_TYPES, PLACEMENT_FEATURES_1, Path("out") / "placement.svg"
ROAD_TYPES,
PLACEMENT_FEATURES_1 + [{}] + PLACEMENT_FEATURES_2,
Path("out") / "placement.svg",
)

0 comments on commit 11596c4

Please sign in to comment.