From 38a3d118abb885c65c363bcab35d126d1c32b8c0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 Sep 2016 11:24:57 +0200 Subject: [PATCH] Nicer linebreaking in _render_log --- tests/end2end/fixtures/testprocess.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/end2end/fixtures/testprocess.py b/tests/end2end/fixtures/testprocess.py index 4cf1d7218..c6f4edd22 100644 --- a/tests/end2end/fixtures/testprocess.py +++ b/tests/end2end/fixtures/testprocess.py @@ -80,9 +80,8 @@ def _render_log(data, threshold=100): data = [str(d) for d in data] is_exception = any('Traceback (most recent call last):' in line for line in data) - if (len(data) > threshold and - not pytest.config.getoption('--verbose') and - not is_exception): + verbose = pytest.config.getoption('--verbose') + if len(data) > threshold and not verbose and not is_exception: msg = '[{} lines suppressed, use -v to show]'.format( len(data) - threshold) data = [msg] + data[-threshold:]