This commit is contained in:
Florian Bruhin 2017-05-11 08:12:20 +02:00
parent 3f8b9fb1a5
commit c4307c9f03
2 changed files with 4 additions and 3 deletions

View File

@ -106,7 +106,8 @@ def _generate_stylesheet():
color: {{ color['%s'] }};
background-color: {{ color['%s'] }};
}
""" % (flag, flag, flag, option.format('fg'), option.format('bg'))
""" % (flag, flag, flag, # flake8: disable=S001
option.format('fg'), option.format('bg'))
return stylesheet

View File

@ -78,8 +78,8 @@ class Line:
def _render_log(data, threshold=100):
"""Shorten the given log without -v and convert to a string."""
data = [str(d) for d in data]
is_exception = any('Traceback (most recent call last):' in line
or 'Uncaught exception' in line for line in data)
is_exception = any('Traceback (most recent call last):' in line or
'Uncaught exception' in line for line in data)
verbose = pytest.config.getoption('--verbose')
if len(data) > threshold and not verbose and not is_exception:
msg = '[{} lines suppressed, use -v to show]'.format(