File: test_cli.py

package info (click to toggle)
antimeridian 0.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,948 kB
  • sloc: python: 1,165; sh: 8; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from pathlib import Path
from typing import Callable

import pytest
from pytest_console_scripts import ScriptRunner

pytest.importorskip("click")


def test_fix(script_runner: ScriptRunner, input_path: Callable[[str], Path]) -> None:
    path = input_path("simple")
    result = script_runner.run(["antimeridian", "fix", str(path)])
    assert result.success


def test_segment(
    script_runner: ScriptRunner, input_path: Callable[[str], Path]
) -> None:
    path = input_path("simple")
    result = script_runner.run(["antimeridian", "segment", str(path)])
    assert result.success