All checks were successful
技能自动化发布 / release (push) Successful in 9s
Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
821 B
Python
34 lines
821 B
Python
# -*- coding: utf-8 -*-
|
|
"""Smoke test: built-in CLI usage lists routed account subcommands."""
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
import pytest
|
|
|
|
_scripts = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "scripts")
|
|
|
|
|
|
def test_usage_includes_all_account_subcommands():
|
|
env = {**os.environ, "PYTHONPATH": _scripts}
|
|
r = subprocess.run(
|
|
[sys.executable, "-m", "cli.app"],
|
|
capture_output=True,
|
|
text=True,
|
|
env=env,
|
|
cwd=_scripts,
|
|
)
|
|
assert r.returncode == 1
|
|
usage = r.stdout
|
|
for cmd in (
|
|
"init-master-key",
|
|
"export-credentials",
|
|
"import-credentials",
|
|
"add-web",
|
|
"get-credential",
|
|
"pick-web",
|
|
):
|
|
assert cmd in usage, f"USAGE 缺少 {cmd}"
|