diff options
author | Brad Warren <bmw@users.noreply.github.com> | 2020-02-10 22:01:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-10 22:01:17 +0300 |
commit | 02bf7d7dfc0864b742f0efe9cc7074f525a872ab (patch) | |
tree | 5f047ed96d5d5cbd5779dfb4973c690cf65d47bb | |
parent | e6f050dbe9fa8faf247f0489c25987c742f72ff3 (diff) |
Print script output in case of a failure. (#7759)
These tests failed at https://travis-ci.com/certbot/certbot/jobs/285202481 but do not include any output from the script about what went wrong because the string created from `subprocess.CalledProcessError` does not include value of output.
This PR fixes that by printing these values which `pytest` will include in the output if the test fails.
-rw-r--r-- | letsencrypt-auto-source/tests/auto_test.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/letsencrypt-auto-source/tests/auto_test.py b/letsencrypt-auto-source/tests/auto_test.py index 9c823fb55..805bb21af 100644 --- a/letsencrypt-auto-source/tests/auto_test.py +++ b/letsencrypt-auto-source/tests/auto_test.py @@ -167,6 +167,10 @@ def out_and_err(command, input=None, shell=False, env=None): if status: error = CalledProcessError(status, command) error.output = out + print('stdout output was:') + print(out) + print('stderr output was:') + print(err) raise error return out, err |