Download tests/test_classifier.py from smlflg/agent-process-dashboard: direct link, hf CLI and curl.
- Browser
- Download file 872 Bytes
-
https://huggingface.co/smlflg/agent-process-dashboard/resolve/main/tests/test_classifier.py
- Command line
-
hf download hf://smlflg/agent-process-dashboard/tests/test_classifier.py
-
curl -L -o test_classifier.py https://huggingface.co/smlflg/agent-process-dashboard/resolve/main/tests/test_classifier.py
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" | |