diff --git a/test/test_style.py b/test/test_style.py index b35ca7a..88aa2ea 100644 --- a/test/test_style.py +++ b/test/test_style.py @@ -28,3 +28,26 @@ def test_style_area() -> None: style = SCHEME.get_style({"landuse": "grass"}, 18) assert len(style) == 1 assert style[0].style == {"fill": "#CFE0A8", "stroke": "#BFD098"} + + +def test_style_way() -> None: + """ + Test constructing style of highway=primary. + """ + style = SCHEME.get_style({"highway": "primary"}, 18) + assert len(style) == 2 + assert style[0].style == { + "fill": "none", + "stroke": "#AA8800", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": 200, + } + assert style[1].style == { + "fill": "none", + "stroke": "#FFDD66", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": 198, + } + assert style[0].priority < style[1].priority