From dba0caf88f526fcfc281217213fda0cef2c1d75b Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Sun, 15 May 2022 20:40:35 +0300 Subject: [PATCH] Add unwrapped test for element. --- tests/test_command_line.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test_command_line.py b/tests/test_command_line.py index fb2bebc..b3e0b09 100644 --- a/tests/test_command_line.py +++ b/tests/test_command_line.py @@ -1,6 +1,7 @@ """ Test command line commands. """ +import argparse from pathlib import Path from subprocess import PIPE, Popen @@ -10,7 +11,7 @@ __email__ = "me@enzet.ru" from xml.etree import ElementTree 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 = ( b"INFO Constructing ways...\n" @@ -122,6 +123,15 @@ def test_element() -> None: 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: """Test `tile` command.""" run(