diff --git a/tests/test_agent_loop_tool_calling.py b/tests/test_agent_loop_tool_calling.py index 44fa3c72c6..b07fdefeb1 100644 --- a/tests/test_agent_loop_tool_calling.py +++ b/tests/test_agent_loop_tool_calling.py @@ -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) # ========================================================================= diff --git a/tests/test_agent_loop_vllm.py b/tests/test_agent_loop_vllm.py index 1a21d440c9..d47478ecbb 100644 --- a/tests/test_agent_loop_vllm.py +++ b/tests/test_agent_loop_vllm.py @@ -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) # ========================================================================= diff --git a/tests/tools/test_modal_sandbox_fixes.py b/tests/tools/test_modal_sandbox_fixes.py index 49437a8dce..b2d7fe0222 100644 --- a/tests/tools/test_modal_sandbox_fixes.py +++ b/tests/tools/test_modal_sandbox_fixes.py @@ -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) # =========================================================================