mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
test: align env-scrub fixtures with idle-timeout runner; assert env passed in no-shell kwargs
This commit is contained in:
parent
fc26e965bb
commit
59fc68e93f
2 changed files with 17 additions and 4 deletions
|
|
@ -510,11 +510,17 @@ class TestTranscribeLocalCommand:
|
|||
|
||||
captured = {}
|
||||
|
||||
class _Stream:
|
||||
def read(self, size):
|
||||
return ""
|
||||
|
||||
class Proc:
|
||||
returncode = 0
|
||||
stdout = _Stream()
|
||||
stderr = _Stream()
|
||||
|
||||
def communicate(self, timeout=None):
|
||||
return "", ""
|
||||
def wait(self, timeout=None):
|
||||
return 0
|
||||
|
||||
def fake_popen(command, **kwargs):
|
||||
captured["env"] = kwargs["env"]
|
||||
|
|
@ -2198,6 +2204,7 @@ class TestShellSafety:
|
|||
"--output_dir",
|
||||
str(output_dir),
|
||||
]
|
||||
assert invocation["kwargs"].pop("env") is not None
|
||||
assert invocation["kwargs"] == {
|
||||
"check": True,
|
||||
"capture_output": True,
|
||||
|
|
|
|||
|
|
@ -134,11 +134,17 @@ class TestCommandTtsEnv:
|
|||
|
||||
captured = {}
|
||||
|
||||
class _Stream:
|
||||
def read(self, size):
|
||||
return ""
|
||||
|
||||
class Proc:
|
||||
returncode = 0
|
||||
stdout = _Stream()
|
||||
stderr = _Stream()
|
||||
|
||||
def communicate(self, timeout=None):
|
||||
return "", ""
|
||||
def wait(self, timeout=None):
|
||||
return 0
|
||||
|
||||
def fake_popen(command, **kwargs):
|
||||
captured["env"] = kwargs["env"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue