mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00: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:
parent
366de72a38
commit
0f53275169
3 changed files with 13 additions and 4 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
# =========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue