mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-05-06 16:26:16 +08:00
Add Python smoke tests
This commit is contained in:
23
tests/test_agents_smoke.py
Normal file
23
tests/test_agents_smoke.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
import py_compile
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
AGENTS_DIR = ROOT / "agents"
|
||||
AGENT_FILES = sorted(
|
||||
path for path in AGENTS_DIR.glob("*.py") if path.name != "__init__.py"
|
||||
)
|
||||
AGENT_IDS = [path.name for path in AGENT_FILES]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("agent_path", AGENT_FILES, ids=AGENT_IDS)
|
||||
def test_agent_scripts_compile(agent_path: Path) -> None:
|
||||
_ = py_compile.compile(str(agent_path), doraise=True)
|
||||
|
||||
|
||||
def test_agent_scripts_exist() -> None:
|
||||
assert AGENT_FILES, "expected at least one agent script"
|
||||
Reference in New Issue
Block a user