6c9c7fe7f3
CI / integration tests (3.13) (push) Failing after 1s
Commit lint / pull request title (push) Has been skipped
Docs / links (push) Failing after 1s
CI / unit tests (3.13) (push) Failing after 1s
CI / lint (push) Failing after 1s
CI / integration tests (push) Failing after 1s
CI / package build (push) Failing after 1s
Commit lint / commit messages (push) Failing after 1s
CI / unit tests (push) Failing after 1s
24 lines
738 B
Python
24 lines
738 B
Python
"""CLI root app — verifies sub-typer wiring + ``--help`` exit code."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typer.testing import CliRunner
|
|
|
|
from everos.entrypoints.cli.main import app
|
|
|
|
|
|
def test_help_exits_zero() -> None:
|
|
result = CliRunner().invoke(app, ["--help"])
|
|
assert result.exit_code == 0
|
|
assert "everos" in result.stdout
|
|
assert "server" in result.stdout
|
|
assert "cascade" in result.stdout
|
|
assert "config" in result.stdout
|
|
|
|
|
|
def test_no_args_shows_help_and_exits_nonzero() -> None:
|
|
# ``no_args_is_help=True`` triggers a help exit with code 2 (typer default).
|
|
result = CliRunner().invoke(app, [])
|
|
assert result.exit_code != 0
|
|
assert "Usage" in result.stdout or "Usage" in result.stderr
|