From f36082938eb121b505e1e0ae58c3f5567b471b12 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 8 May 2020 09:48:04 -0700 Subject: [PATCH] Additional test coverage. --- tests/unit/test_execute.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/unit/test_execute.py b/tests/unit/test_execute.py index 066b4ef83..9fd34654b 100644 --- a/tests/unit/test_execute.py +++ b/tests/unit/test_execute.py @@ -24,6 +24,19 @@ def test_exit_code_indicates_error_respects_exit_code_and_error_on_warnings( ) +def output_buffer_for_process_returns_stderr_when_stdout_excluded(): + stdout = flexmock() + process = flexmock(stdout=stdout) + + module.output_buffer_for_process(process, excluded_stdouts=[flexmock(), stdout]) + + +def output_buffer_for_process_returns_stdout_when_not_excluded(): + process = flexmock(stdout=flexmock()) + + module.output_buffer_for_process(process, excluded_stdouts=[flexmock(), flexmock()]) + + def test_execute_command_calls_full_command(): full_command = ['foo', 'bar'] flexmock(module.os, environ={'a': 'b'})