summaryrefslogtreecommitdiff
path: root/test/runner
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2017-09-09 08:59:09 -0700
committerGitHub <noreply@github.com>2017-09-09 08:59:09 -0700
commitf88750d66512bb01fa64e9080f3d3fbc9eb9d758 (patch)
tree38257447650fbed61a8426e41030751500367353 /test/runner
parent4c229e566efe576b95b706240702bb095db9355b (diff)
downloadansible-f88750d66512bb01fa64e9080f3d3fbc9eb9d758.tar.gz
Expand disabled pylint rules. (#29162)
* Expand disabled pylint rules. * Fix pylint and unicode issues in ansible-test.
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()