Add simple tests for fish and Taginfo.

This commit is contained in:
Sergey Vartanov 2021-11-10 02:30:09 +03:00
parent c193901e15
commit 8d5f5a3492
2 changed files with 26 additions and 0 deletions

9
tests/test_completion.py Normal file
View file

@ -0,0 +1,9 @@
"""
Test Fish shell completion.
"""
from map_machine.ui.completion import completion_commands
def test_completion() -> None:
commands: str = completion_commands()
assert commands.startswith("set -l")

17
tests/test_taginfo.py Normal file
View file

@ -0,0 +1,17 @@
"""
Test Taginfo project generation.
"""
from pathlib import Path
from map_machine.doc.taginfo import TaginfoProjectFile
from tests import SCHEME
def test_taginfo() -> None:
"""Test Taginfo project generation."""
output_file_path: Path = Path("temp") / "taginfo.json"
project_file: TaginfoProjectFile = TaginfoProjectFile(
output_file_path, SCHEME
)
assert project_file.structure["project"]["name"] == "Map Machine"