mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-17 19:16:22 +02:00
Add label test.
This commit is contained in:
parent
7969b96347
commit
8bb43c5c22
1 changed files with 15 additions and 0 deletions
15
test/test_text.py
Normal file
15
test/test_text.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
"""
|
||||||
|
Author: Sergey Vartanov (me@enzet.ru).
|
||||||
|
"""
|
||||||
|
from roentgen.scheme import Scheme
|
||||||
|
|
||||||
|
|
||||||
|
def get_text(tags):
|
||||||
|
scheme = Scheme("data/tags.yml")
|
||||||
|
return scheme.construct_text(tags, True)
|
||||||
|
|
||||||
|
|
||||||
|
def test_1_label() -> None:
|
||||||
|
labels = get_text({"name": "Name"})
|
||||||
|
assert len(labels) == 1
|
||||||
|
assert labels[0].text == "Name"
|
Loading…
Add table
Add a link
Reference in a new issue