Add unwrapped test for element.

This commit is contained in:
Sergey Vartanov 2022-05-15 20:40:35 +03:00
parent c58cbfe4f9
commit dba0caf88f

View file

@ -1,6 +1,7 @@
""" """
Test command line commands. Test command line commands.
""" """
import argparse
from pathlib import Path from pathlib import Path
from subprocess import PIPE, Popen from subprocess import PIPE, Popen
@ -10,7 +11,7 @@ __email__ = "me@enzet.ru"
from xml.etree import ElementTree from xml.etree import ElementTree
from xml.etree.ElementTree import Element from xml.etree.ElementTree import Element
from map_machine.ui.cli import COMMAND_LINES from map_machine.ui.cli import COMMAND_LINES, parse_arguments
LOG: bytes = ( LOG: bytes = (
b"INFO Constructing ways...\n" b"INFO Constructing ways...\n"
@ -122,6 +123,15 @@ def test_element() -> None:
assert (Path("out") / "element.svg").is_file() assert (Path("out") / "element.svg").is_file()
def test_unwrapped_element() -> None:
arguments: argparse.Namespace = parse_arguments(
["map_machine"] + COMMAND_LINES["element"]
)
from map_machine.element.single import draw_element
draw_element(arguments)
def test_tile() -> None: def test_tile() -> None:
"""Test `tile` command.""" """Test `tile` command."""
run( run(