fix: stop local terminal warning without minisweagent
This commit is contained in:
15
tests/tools/test_terminal_requirements.py
Normal file
15
tests/tools/test_terminal_requirements.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import logging
|
||||
|
||||
from tools.terminal_tool import check_terminal_requirements
|
||||
|
||||
|
||||
def test_local_terminal_requirements_do_not_depend_on_minisweagent(monkeypatch, caplog):
|
||||
"""Local backend uses Hermes' own LocalEnvironment wrapper and should not
|
||||
be marked unavailable just because `minisweagent` isn't importable."""
|
||||
monkeypatch.setenv("TERMINAL_ENV", "local")
|
||||
|
||||
with caplog.at_level(logging.ERROR):
|
||||
ok = check_terminal_requirements()
|
||||
|
||||
assert ok is True
|
||||
assert "Terminal requirements check failed" not in caplog.text
|
||||
@@ -1130,7 +1130,8 @@ def check_terminal_requirements() -> bool:
|
||||
|
||||
try:
|
||||
if env_type == "local":
|
||||
from minisweagent.environments.local import LocalEnvironment
|
||||
# Local execution uses Hermes' own LocalEnvironment wrapper and does
|
||||
# not depend on minisweagent being importable.
|
||||
return True
|
||||
elif env_type == "docker":
|
||||
from minisweagent.environments.docker import DockerEnvironment
|
||||
|
||||
Reference in New Issue
Block a user