agent-process-dashboard / tests /test_classifier.py
smlflg's picture
Initial public upload from Projekte/agent-process-dashboard
06357e7 verified
Raw History Blame Contribute Delete
872 Bytes
from agent_process_dashboard.classifier import classify_process
from .helpers import sample
def test_classifier_detects_bridge_script():
classification = classify_process(sample(10, ("node", "gemini_acp_mcp_bridge.mjs")))
assert classification.known_class == "mcp.bridge.gemini_acp"
assert classification.is_bridge
assert classification.is_mcp
def test_classifier_detects_codex_by_basename():
classification = classify_process(sample(10, ("/home/smlflg/.local/bin/codex",)))
assert classification.known_class == "agent.codex"
def test_classifier_does_not_treat_incidental_codex_path_as_agent():
proc = sample(10, ("python", "app.py"))
proc = proc.__class__(**{**proc.__dict__, "cwd": "/home/smlflg/Projekte/CodexDashBoard"})
classification = classify_process(proc)
assert classification.known_class == "wrapper.runtime"