summaryrefslogtreecommitdiff
path: root/test/runner
diff options
context:
space:
mode:
Diffstat (limited to 'test/runner')
-rw-r--r--test/runner/lib/sanity/pylint.py2
-rw-r--r--test/runner/lib/test.py2
-rw-r--r--test/runner/lib/util.py3
3 files changed, 5 insertions, 2 deletions
diff --git a/test/runner/lib/sanity/pylint.py b/test/runner/lib/sanity/pylint.py
index d8659d230c..45347a09e3 100644
--- a/test/runner/lib/sanity/pylint.py
+++ b/test/runner/lib/sanity/pylint.py
@@ -89,7 +89,7 @@ class PylintTest(SanitySingleVersion):
messages = []
errors = [SanityMessage(
- message=m['message'],
+ message=m['message'].replace('\n', ' '),
path=m['path'],
line=int(m['line']),
column=int(m['column']),
diff --git a/test/runner/lib/test.py b/test/runner/lib/test.py
index 0e163a99f9..967f1d842b 100644
--- a/test/runner/lib/test.py
+++ b/test/runner/lib/test.py
@@ -359,7 +359,7 @@ class TestFailure(TestResult):
if self.summary:
block = self.summary
else:
- block = '\n'.join(str(m) for m in self.messages)
+ block = '\n'.join(m.format() for m in self.messages)
message = block.strip()
diff --git a/test/runner/lib/util.py b/test/runner/lib/util.py
index 8d58d4843c..20da394ede 100644
--- a/test/runner/lib/util.py
+++ b/test/runner/lib/util.py
@@ -374,6 +374,9 @@ class Display(object):
message = message.replace(self.clear, color)
message = '%s%s%s' % (color, message, self.clear)
+ if sys.version_info[0] == 2 and isinstance(message, type(u'')):
+ message = message.encode('utf-8')
+
print(message, file=fd)
fd.flush()