mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +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
|
|
@ -2795,6 +2795,13 @@ class TestMcpInvocationResolution:
|
|||
fields, wrong types) falls back to the literal `["mcp"]` baseline.
|
||||
"""
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _no_overlay_off(self):
|
||||
"""Disable the --no-overlay flag so tests assert baseline args."""
|
||||
with patch("tools.computer_use.cua_backend._cua_no_overlay",
|
||||
return_value=False):
|
||||
yield
|
||||
|
||||
@staticmethod
|
||||
def _fake_run(stdout: str = "", returncode: int = 0, raises: Exception = None):
|
||||
"""Build a patched subprocess.run that yields the supplied result."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue