test: skip atropos-dependent tests when atroposlib not installed

Guard all test files that import from environments/ or atroposlib
with try/except + pytest.skip(allow_module_level=True) so they
gracefully skip instead of crashing when deps aren't available.
This commit is contained in:
dmahan93
2026-03-09 23:14:53 -05:00
committed by teknium1
parent 366de72a38
commit 0f53275169
3 changed files with 13 additions and 4 deletions

View File

@@ -33,7 +33,10 @@ _repo_root = Path(__file__).resolve().parent.parent
if str(_repo_root) not in sys.path:
sys.path.insert(0, str(_repo_root))
from environments.agent_loop import AgentResult, HermesAgentLoop
try:
from environments.agent_loop import AgentResult, HermesAgentLoop
except ImportError:
pytest.skip("atroposlib not installed", allow_module_level=True)
# =========================================================================

View File

@@ -34,7 +34,10 @@ _repo_root = Path(__file__).resolve().parent.parent
if str(_repo_root) not in sys.path:
sys.path.insert(0, str(_repo_root))
from environments.agent_loop import AgentResult, HermesAgentLoop
try:
from environments.agent_loop import AgentResult, HermesAgentLoop
except ImportError:
pytest.skip("atroposlib not installed", allow_module_level=True)
# =========================================================================

View File

@@ -22,8 +22,11 @@ _repo_root = Path(__file__).resolve().parent.parent.parent
if str(_repo_root) not in sys.path:
sys.path.insert(0, str(_repo_root))
import tools.terminal_tool # noqa: F401
_tt_mod = sys.modules["tools.terminal_tool"]
try:
import tools.terminal_tool # noqa: F401
_tt_mod = sys.modules["tools.terminal_tool"]
except ImportError:
pytest.skip("hermes-agent tools not importable (missing deps)", allow_module_level=True)
# =========================================================================