Skip to content

Commit

Permalink
log command output in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed May 19, 2019
1 parent 5467b29 commit 506f354
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
3 changes: 3 additions & 0 deletions tests/test_migrate_flaskcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down

0 comments on commit 506f354

Please sign in to comment.