Add flinger test.

This commit is contained in:
Sergey Vartanov 2021-05-29 15:36:03 +03:00
parent a899706923
commit 867001d797
4 changed files with 49 additions and 5 deletions

View file

@ -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