mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-10-20 05:15:31 +00:00
test(computer_use): isolate backend env in check_fn test
This commit is contained in:
parent
8eb7aa5966
commit
e81ac4b192
1 changed files with 6 additions and 5 deletions
|
|
@ -115,11 +115,12 @@ class TestRegistration:
|
|||
import tools.computer_use_tool # noqa: F401
|
||||
from tools.registry import registry
|
||||
entry = registry._tools["computer_use"]
|
||||
if sys.platform == "win32":
|
||||
from tools.computer_use.windows_backend import windows_backend_available
|
||||
assert entry.check_fn() is windows_backend_available()
|
||||
elif sys.platform != "darwin":
|
||||
assert entry.check_fn() is False
|
||||
with patch.dict(os.environ, {}, clear=True):
|
||||
if sys.platform == "win32":
|
||||
from tools.computer_use.windows_backend import windows_backend_available
|
||||
assert entry.check_fn() is windows_backend_available()
|
||||
elif sys.platform != "darwin":
|
||||
assert entry.check_fn() is False
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue