mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-02 11:46:41 +02:00
27 lines
601 B
Python
27 lines
601 B
Python
"""
|
|
Test MapCSS generation.
|
|
"""
|
|
from roentgen.mapcss import MapCSSWriter
|
|
from roentgen.scheme import NodeMatcher
|
|
from test import SCHEME
|
|
|
|
__author__ = "Sergey Vartanov"
|
|
__email__ = "me@enzet.ru"
|
|
|
|
|
|
def test_mapcss() -> None:
|
|
"""
|
|
Test MapCSS generation.
|
|
"""
|
|
writer: MapCSSWriter = MapCSSWriter(SCHEME, "icons", False)
|
|
matcher: NodeMatcher = NodeMatcher(
|
|
{"tags": {"natural": "tree"}, "shapes": ["tree"]}
|
|
)
|
|
selector = writer.add_selector("node", matcher)
|
|
assert (
|
|
selector
|
|
== """node[natural="tree"] {
|
|
icon-image: "icons/tree.svg";
|
|
}
|
|
"""
|
|
)
|