Nicer linebreaking in _render_log
This commit is contained in:
parent
469c75662e
commit
38a3d118ab
@ -80,9 +80,8 @@ def _render_log(data, threshold=100):
|
|||||||
data = [str(d) for d in data]
|
data = [str(d) for d in data]
|
||||||
is_exception = any('Traceback (most recent call last):' in line
|
is_exception = any('Traceback (most recent call last):' in line
|
||||||
for line in data)
|
for line in data)
|
||||||
if (len(data) > threshold and
|
verbose = pytest.config.getoption('--verbose')
|
||||||
not pytest.config.getoption('--verbose') and
|
if len(data) > threshold and not verbose and not is_exception:
|
||||||
not is_exception):
|
|
||||||
msg = '[{} lines suppressed, use -v to show]'.format(
|
msg = '[{} lines suppressed, use -v to show]'.format(
|
||||||
len(data) - threshold)
|
len(data) - threshold)
|
||||||
data = [msg] + data[-threshold:]
|
data = [msg] + data[-threshold:]
|
||||||
|
Loading…
Reference in New Issue
Block a user