mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-03 19:31:52 +02:00
Add unwrapped test for element.
This commit is contained in:
parent
c58cbfe4f9
commit
dba0caf88f
1 changed files with 11 additions and 1 deletions
|
@ -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(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue