mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-11-27 23:58:47 +00:00
Some checks failed
CI / Python quality / GitHub Actions (push) Waiting to run
CI / Python quality / Pre-commit (push) Waiting to run
CI / Python tests / Unit Tests - py3.12 (push) Waiting to run
CI / Python tests / Unit Tests - py3.13 (push) Waiting to run
CI / Python tests / Unit Tests - py3.14 (push) Waiting to run
CI / Python tests / Hermes embedded - ubuntu-latest (push) Waiting to run
Security / CodeQL / Analyze javascript-typescript (push) Waiting to run
CI / Python tests / Hermes embedded - windows-latest (push) Waiting to run
CI / Python tests / Unit Tests - py3.11 (push) Waiting to run
CI / Windows / CLI smoke - py3.11 (push) Waiting to run
Security / CodeQL / Analyze python (push) Waiting to run
Deploy / Documentation / Build documentation (push) Has been cancelled
Deploy / Documentation / deploy (push) Has been cancelled
34 lines
1.3 KiB
Python
34 lines
1.3 KiB
Python
"""Opt-in native Claude Code validation of both generated MCP connection modes."""
|
|
|
|
# pylint: disable=missing-function-docstring
|
|
|
|
import importlib.util
|
|
import os
|
|
from pathlib import Path
|
|
import subprocess
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.mark.parametrize("transport", ["http", "stdio"])
|
|
def test_generated_claude_plugin_validates_without_model_calls(tmp_path, monkeypatch, transport):
|
|
binary = os.environ.get("REME_CLAUDE_BIN")
|
|
if not binary:
|
|
pytest.skip("Set REME_CLAUDE_BIN to run the native Claude Code manifest check")
|
|
monkeypatch.setenv("CLAUDE_CONFIG_DIR", str(tmp_path / "claude-home"))
|
|
script = Path(__file__).resolve().parents[2] / "integrations/configure_mcp.py"
|
|
spec = importlib.util.spec_from_file_location("reme_configure_mcp", script)
|
|
setup = importlib.util.module_from_spec(spec)
|
|
spec.loader.exec_module(setup)
|
|
marketplace = setup.configure("claude-code", transport)
|
|
for target in (marketplace, marketplace / "reme"):
|
|
result = subprocess.run(
|
|
[binary, "plugin", "validate", str(target)],
|
|
cwd=tmp_path,
|
|
env=os.environ.copy(),
|
|
capture_output=True,
|
|
text=True,
|
|
check=False,
|
|
timeout=60,
|
|
)
|
|
assert result.returncode == 0, result.stdout + result.stderr
|