mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-26 17:38:36 +00:00
fix(computer_use): mock _cua_no_overlay in existing tests, fix platform-dependent assertions
- Add autouse fixture to TestMcpInvocationResolution to disable --no-overlay flag so existing tests assert baseline args - Make test_config_load_failure_fails_safe and test_missing_section_enables platform-aware (Linux auto-detect returns True, macOS/Windows False)
This commit is contained in:
parent
8ceada6e30
commit
f43ff5b4bb
2 changed files with 12 additions and 3 deletions
|
|
@ -47,15 +47,17 @@ class TestNoOverlayFlag:
|
|||
assert cua_backend._cua_no_overlay() is False
|
||||
|
||||
def test_config_load_failure_fails_safe(self):
|
||||
"""Unreadable config => default to overlay enabled."""
|
||||
"""Unreadable config => auto-detect (platform-dependent)."""
|
||||
with patch("hermes_cli.config.load_config",
|
||||
side_effect=RuntimeError("boom")):
|
||||
assert cua_backend._cua_no_overlay() is False
|
||||
expected = sys.platform == "linux"
|
||||
assert cua_backend._cua_no_overlay() is expected
|
||||
|
||||
def test_missing_section_enables(self):
|
||||
with patch("hermes_cli.config.load_config",
|
||||
return_value={"other": {}}):
|
||||
assert cua_backend._cua_no_overlay() is False
|
||||
expected = sys.platform == "linux"
|
||||
assert cua_backend._cua_no_overlay() is expected
|
||||
|
||||
|
||||
class TestMcpArgsOverlayFlag:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue