Add scheme test.

This commit is contained in:
Sergey Vartanov 2021-12-04 22:22:08 +03:00
parent 699c1e9592
commit 82ecbdef81

15
tests/test_scheme.py Normal file
View file

@ -0,0 +1,15 @@
"""
Test scheme parsing.
"""
from map_machine.scheme import Scheme
def test_verification() -> None:
assert (
Scheme({"node_icons": [{"tags": {"a": "b"}}]}).node_matchers[0].verify()
is True
)
assert (
Scheme({"node_icons": [{"tags": {"a": 0}}]}).node_matchers[0].verify()
is False
)