mirror of
https://github.com/enzet/map-machine.git
synced 2025-07-21 10:27:47 +02:00
Add flinger test.
This commit is contained in:
parent
a899706923
commit
867001d797
4 changed files with 49 additions and 5 deletions
|
@ -4,6 +4,7 @@ Test icon generation for nodes.
|
|||
from os import makedirs
|
||||
from typing import Dict
|
||||
|
||||
from roentgen.icon import IconSet
|
||||
from roentgen.grid import draw_all_icons
|
||||
from test import SCHEME, SCHEME_EXTRACTOR
|
||||
|
||||
|
@ -12,12 +13,17 @@ __email__ = "me@enzet.ru"
|
|||
|
||||
|
||||
def test_icons() -> None:
|
||||
""" Test grid drawing. """
|
||||
"""
|
||||
Test grid drawing.
|
||||
"""
|
||||
makedirs("icon_set", exist_ok=True)
|
||||
draw_all_icons(SCHEME, SCHEME_EXTRACTOR, "temp.svg", "icon_set")
|
||||
|
||||
|
||||
def get_icon(tags: Dict[str, str]):
|
||||
def get_icon(tags: Dict[str, str]) -> IconSet:
|
||||
"""
|
||||
Construct icon from tags.
|
||||
"""
|
||||
icon, _ = SCHEME.get_icon(SCHEME_EXTRACTOR, tags)
|
||||
return icon
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue