diff options
-rw-r--r-- | tests/helpers.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/helpers.py b/tests/helpers.py index 369875b9..40b0f481 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -34,17 +34,15 @@ def run_command(cmd): cmd, shell=True, env=sub_env, - stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) output, _ = proc.communicate() status = proc.returncode # Get the output, and canonicalize it to strings with newlines. - if not isinstance(output, str): - output = output.decode(output_encoding()) - output = output.replace('\r', '') - + output = output.decode(output_encoding()).replace("\r", "") return status, output |