mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-22 21:46:24 +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
25
tests/test_mapcss.py
Normal file
25
tests/test_mapcss.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
"""
|
||||
Test MapCSS generation.
|
||||
"""
|
||||
from roentgen.mapcss import MapCSSWriter
|
||||
from roentgen.scheme import NodeMatcher
|
||||
from tests import SCHEME
|
||||
|
||||
__author__ = "Sergey Vartanov"
|
||||
__email__ = "me@enzet.ru"
|
||||
|
||||
|
||||
def test_mapcss() -> None:
|
||||
"""Test MapCSS generation."""
|
||||
writer: MapCSSWriter = MapCSSWriter(SCHEME, "icons")
|
||||
matcher: NodeMatcher = NodeMatcher(
|
||||
{"tags": {"natural": "tree"}, "shapes": ["tree"]}, {}
|
||||
)
|
||||
selector = writer.add_selector("node", matcher)
|
||||
assert (
|
||||
selector
|
||||
== """node[natural="tree"] {
|
||||
icon-image: "icons/tree.svg";
|
||||
}
|
||||
"""
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue