mirror of
https://github.com/enzet/map-machine.git
synced 2025-04-29 10:17:23 +02:00
Add test for default icon color.
This commit is contained in:
parent
a55579e4e2
commit
bd026c2c73
1 changed files with 12 additions and 0 deletions
|
@ -15,6 +15,7 @@ __email__ = "me@enzet.ru"
|
|||
|
||||
|
||||
COLLECTION: IconCollection = IconCollection.from_scheme(SCHEME, SHAPE_EXTRACTOR)
|
||||
DEFAULT_COLOR: Color = SCHEME.get_color("default")
|
||||
|
||||
|
||||
def test_grid() -> None:
|
||||
|
@ -52,6 +53,17 @@ def test_no_icons() -> None:
|
|||
"""
|
||||
icon: IconSet = get_icon({"aaa": "bbb"})
|
||||
assert icon.main_icon.is_default()
|
||||
assert icon.main_icon.shape_specifications[0].color == DEFAULT_COLOR
|
||||
|
||||
|
||||
def test_no_icons_but_color() -> None:
|
||||
"""
|
||||
Tags that has no description in scheme, but have `colour` tag and should be
|
||||
visualized with default shape with the given color.
|
||||
"""
|
||||
icon: IconSet = get_icon({"aaa": "bbb", "colour": "#424242"})
|
||||
assert icon.main_icon.is_default()
|
||||
assert icon.main_icon.shape_specifications[0].color == Color("#424242")
|
||||
|
||||
|
||||
def check_icon_set(
|
||||
|
|
Loading…
Add table
Reference in a new issue