mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-08 22:01:51 +02:00
Add simple tests for fish and Taginfo.
This commit is contained in:
parent
c193901e15
commit
8d5f5a3492
2 changed files with 26 additions and 0 deletions
9
tests/test_completion.py
Normal file
9
tests/test_completion.py
Normal 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
17
tests/test_taginfo.py
Normal 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"
|
Loading…
Add table
Add a link
Reference in a new issue