Skip to content

The agent that grows with you

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

Teknium59fc68e93ff6
diff --git a/tests/tools/test_transcription_tools.py b/tests/tools/test_transcription_tools.py
index c5e39728c40..ed20bd3aa99 100644
--- a/tests/tools/test_transcription_tools.py
+++ b/tests/tools/test_transcription_tools.py
@@ -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,
diff --git a/tests/tools/test_tts_command_providers.py b/tests/tools/test_tts_command_providers.py
index c096487bc9a..5b5701c0d82 100644
--- a/tests/tools/test_tts_command_providers.py
+++ b/tests/tools/test_tts_command_providers.py
@@ -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"]