From e8c0527bf782de166722706db119ccb01258e78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 16 Mar 2018 19:23:58 +0100 Subject: [PATCH 06/15] TESTS: Make get_call_output() more flexible about the stderr log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Future tests that will be added will need the stderr redirected to the STDOUT. Related: https://pagure.io/SSSD/sssd/issue/3658 Signed-off-by: Fabiano FidĂȘncio Reviewed-by: Jakub Hrozek --- src/tests/intg/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/intg/util.py b/src/tests/intg/util.py index a1c439648..bfebbfb35 100644 --- a/src/tests/intg/util.py +++ b/src/tests/intg/util.py @@ -80,8 +80,8 @@ def restore_envvar_file(name): os.rename(backup_path, path) -def get_call_output(cmd): +def get_call_output(cmd, stderr_output=subprocess.PIPE): process = subprocess.Popen(cmd, stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + stderr=stderr_output) output, ret = process.communicate() return output.decode('utf-8') -- 2.14.3