You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spiel/tests/cli/test_help.py

20 lines
416 B
Python

import subprocess
import sys
from typer.testing import CliRunner
from spiel.cli import cli
from spiel.constants import PACKAGE_NAME
def test_help(runner: CliRunner) -> None:
result = runner.invoke(cli, ["--help"])
assert result.exit_code == 0
def test_help_via_main() -> None:
result = subprocess.run([sys.executable, "-m", PACKAGE_NAME, "--help"], check=False)
assert result.returncode == 0