mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
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:
@@ -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)
|
||||
|
||||
|
||||
# =========================================================================
|
||||
|
||||
Reference in New Issue
Block a user