diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-04-21 14:13:25 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-04-22 13:55:19 -0700 |
commit | 4dcbb9254a586f59616ddf02bfd508ab76c47f2b (patch) | |
tree | f23df1b1a4ae09d19c1c75b4849a3e1dadb50ad8 | |
parent | 959c1becd63ff8ccbc106755574af9bb49392b08 (diff) | |
download | meson-4dcbb9254a586f59616ddf02bfd508ab76c47f2b.zip meson-4dcbb9254a586f59616ddf02bfd508ab76c47f2b.tar.gz meson-4dcbb9254a586f59616ddf02bfd508ab76c47f2b.tar.bz2 |
mtest: Use textrwap.dedent for large block
This allows editors like vim to properly fold the code, and makes it
generally easier to read.
-rw-r--r-- | mesonbuild/mtest.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 23643c5..8ea8d5f 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -33,6 +33,7 @@ import signal import subprocess import sys import tempfile +import textwrap import time import typing as T @@ -775,14 +776,14 @@ class TestHarness: write_json_log(self.jsonlogfile, name, result) def print_summary(self) -> None: - msg = ''' -Ok: {:<4} -Expected Fail: {:<4} -Fail: {:<4} -Unexpected Pass: {:<4} -Skipped: {:<4} -Timeout: {:<4} -'''.format(self.success_count, self.expectedfail_count, self.fail_count, + msg = textwrap.dedent(''' + Ok: {:<4} + Expected Fail: {:<4} + Fail: {:<4} + Unexpected Pass: {:<4} + Skipped: {:<4} + Timeout: {:<4} + ''').format(self.success_count, self.expectedfail_count, self.fail_count, self.unexpectedpass_count, self.skip_count, self.timeout_count) print(msg) if self.logfile: |