This commit is contained in:
Daniel Schadt 2016-05-26 16:09:59 +02:00
parent fa2636c2f6
commit a6b47a7c09
2 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,7 @@ class LogLine(testprocess.Line):
return self.formatted_str(colorized=False)
def formatted_str(self, colorized=True):
"""Return a formatted colorized line.strip()
"""Return a formatted colorized line.
This returns a line like qute without --json-logging would produce.

View File

@ -199,8 +199,8 @@ def test_log_line_parse(data, attrs):
{'created': 0, 'levelname': 'DEBUG', 'name': 'foo', 'module': 'bar',
'funcName': 'qux', 'lineno': 10, 'levelno': 10, 'message': 'quux'},
True,
'\033[32m{timestamp}\033[0m \033[37mDEBUG \033[0m \033[36mfoo '
'bar:qux:10\033[0m \033[37mquux\033[0m',
'\033[32m{timestamp}\033[0m \033[37mDEBUG \033[0m \033[36mfoo '
' bar:qux:10\033[0m \033[37mquux\033[0m',
),
], ids=['normal', 'traceback', 'colored'])
def test_log_line_formatted(data, colorized, expected):