From f58b7ecf5fa2f91dd3f6489414701b5205cb1187 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Nov 2014 19:06:42 +0100 Subject: [PATCH] print output of run() --- tests/test_cli.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 322c07c..4e38579 100755 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -110,9 +110,13 @@ def run(cmd, cwd=None): kwargs["cwd"] = cwd proc = subprocess.Popen(cmd, **kwargs) - stderr, stdout = proc.communicate() + stdout, stderr = proc.communicate() - return stdout + if VERBOSE: + sys.stdout.write(" stdout: %s\n" % stdout.strip()) + sys.stdout.write(" stderr: %s\n" % stderr.strip()) + + return stdout, stderr class CHDir: