mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-23 22:16:25 +02:00
Rename test to tests; fix equator length.
This commit is contained in:
parent
f744c601d0
commit
ba26c1d4d7
19 changed files with 71 additions and 33 deletions
24
tests/test_style.py
Normal file
24
tests/test_style.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
"""
|
||||
Test style constructing for ways and areas.
|
||||
"""
|
||||
from tests import SCHEME
|
||||
|
||||
__author__ = "Sergey Vartanov"
|
||||
__email__ = "me@enzet.ru"
|
||||
|
||||
|
||||
def test_style_empty() -> None:
|
||||
"""Test constructing style of empty tags."""
|
||||
assert SCHEME.get_style({}) == []
|
||||
|
||||
|
||||
def test_style_unknown() -> None:
|
||||
"""Test constructing style of unknown tags."""
|
||||
assert SCHEME.get_style({"aaa": "bbb"}) == []
|
||||
|
||||
|
||||
def test_style_area() -> None:
|
||||
"""Test constructing style of landuse=grass."""
|
||||
style = SCHEME.get_style({"landuse": "grass"})
|
||||
assert len(style) == 1
|
||||
assert style[0].style == {"fill": "#CFE0A8", "stroke": "#BFD098"}
|
Loading…
Add table
Add a link
Reference in a new issue