bdd: Don't shorten log if an exception happened
This commit is contained in:
parent
1579f27564
commit
266bc6e8d8
@ -76,7 +76,11 @@ class Line:
|
||||
def _render_log(data, threshold=100):
|
||||
"""Shorten the given log without -v and convert to a string."""
|
||||
# pylint: disable=no-member
|
||||
if len(data) > threshold and not pytest.config.getoption('--verbose'):
|
||||
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):
|
||||
msg = '[{} lines suppressed, use -v to show]'.format(
|
||||
len(data) - threshold)
|
||||
data = [msg] + data[-threshold:]
|
||||
|
Loading…
Reference in New Issue
Block a user