test: align env-scrub fixtures with idle-timeout runner; assert env passed in no-shell kwargs

This commit is contained in:
Teknium 2026-07-28 09:32:23 -07:00
parent fc26e965bb
commit 59fc68e93f
2 changed files with 17 additions and 4 deletions

View file

@ -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,

View file

@ -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"]