mirror of
https://github.com/github/spec-kit.git
synced 2026-07-03 20:36:23 +08:00
* Initial plan * feat!: remove legacy --ai, --ai-commands-dir, and --ai-skills flags at 0.10.0 * refactor(tests): rename stale test_ai_help_* methods to test_agent_config_* * fix: address review — derive agent folder for generic integration and remove redundant test - Security notice now falls back to integration_parsed_options['commands_dir'] when AGENT_CONFIG folder is None (generic integration). - Remove test_agent_config_includes_kiro_cli which duplicates the assertion in test_runtime_config_uses_kiro_cli_and_removes_q. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: scrub all remaining --ai flag references from source and tests - Remove dead AI_ASSISTANT_ALIASES, AI_ASSISTANT_HELP, and _build_ai_assistant_help() from _agent_config.py - Update comments/docstrings in extensions.py, presets.py, and integration subpackages to reference 'skills mode' or '--integration' instead of the removed flags - Fix catalog.json generic integration description - Update test docstrings/comments in test_extension_skills.py, test_extensions.py, and test_presets.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: remove legacy --ai flag rejection tests The flags are fully removed from the CLI; typer handles unknown options generically. No custom rejection logic exists to test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * revert: remove manual CHANGELOG.md entry CHANGELOG is generated automatically; manual edits should not be made. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: make generic catalog description self-explanatory Include the required --commands-dir sub-option in the description so readers don't need to look up integration docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(tests): rename duplicate test classes to avoid shadowing The rename from Test*AutoPromote to Test*Integration collided with the existing Test*Integration(SkillsIntegrationTests) base classes, causing the shared test suites to be silently overwritten. Rename the CLI init flow classes to Test*InitFlow instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Manfred Riem <mnriem@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
"""Tests for the commands/ package structure."""
|
|
import importlib
|
|
|
|
|
|
def test_commands_package_importable():
|
|
mod = importlib.import_module("specify_cli.commands")
|
|
assert mod is not None
|
|
|
|
|
|
def test_commands_init_importable():
|
|
mod = importlib.import_module("specify_cli.commands.init")
|
|
assert hasattr(mod, "register")
|
|
assert callable(mod.register)
|
|
|
|
|
|
def test_agent_config_importable():
|
|
from specify_cli._agent_config import (
|
|
AGENT_CONFIG,
|
|
DEFAULT_INIT_INTEGRATION,
|
|
SCRIPT_TYPE_CHOICES,
|
|
)
|
|
assert isinstance(AGENT_CONFIG, dict)
|
|
assert DEFAULT_INIT_INTEGRATION == "copilot"
|
|
assert "sh" in SCRIPT_TYPE_CHOICES
|
|
|
|
|
|
def test_agent_config_re_exported_from_init():
|
|
from specify_cli import AGENT_CONFIG, SCRIPT_TYPE_CHOICES
|
|
assert isinstance(AGENT_CONFIG, dict)
|
|
assert "sh" in SCRIPT_TYPE_CHOICES
|
|
|
|
|
|
def test_init_command_registered():
|
|
from specify_cli import app
|
|
callback_names = [
|
|
cmd.callback.__name__ for cmd in app.registered_commands if cmd.callback
|
|
]
|
|
assert "init" in callback_names
|