mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-22 21:46:24 +02:00
Add way style test.
This commit is contained in:
parent
6aef415579
commit
f1702ece36
1 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue