diff --git a/tests/tools/test_transcription_tools.py b/tests/tools/test_transcription_tools.py index c5e39728c403..ed20bd3aa991 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 c096487bc9a7..5b5701c0d829 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"]