From 506f3541c04dd0b2c020dbafc60a93fb541ca324 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Sun, 19 May 2019 16:27:04 +0100 Subject: [PATCH] log command output in unit tests --- tests/test_migrate.py | 3 +++ tests/test_migrate_flaskcli.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/test_migrate.py b/tests/test_migrate.py index b36e408..85548d1 100644 --- a/tests/test_migrate.py +++ b/tests/test_migrate.py @@ -10,6 +10,9 @@ def run_cmd(cmd): process = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout, stderr) = process.communicate() + print('\n$ ' + cmd) + print(stdout.decode('utf-8')) + print(stderr.decode('utf-8')) return stdout, stderr, process.wait() diff --git a/tests/test_migrate_flaskcli.py b/tests/test_migrate_flaskcli.py index b9977aa..15d496c 100644 --- a/tests/test_migrate_flaskcli.py +++ b/tests/test_migrate_flaskcli.py @@ -11,6 +11,9 @@ def run_cmd(app, cmd): process = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout, stderr) = process.communicate() + print('\n$ ' + cmd) + print(stdout.decode('utf-8')) + print(stderr.decode('utf-8')) return stdout, stderr, process.wait()