changeset 33929:5d2ce90c71f1

run-tests: include "\n" in formatted message instead of calling writeln() So we don't have to strip "\n" from pygments output.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 24 Aug 2017 22:09:57 +0900
parents 6c119dbfd0c0
children f5d4bb8e944d
files tests/run-tests.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Apr 23 13:08:58 2017 +0900
+++ b/tests/run-tests.py	Thu Aug 24 22:09:57 2017 +0900
@@ -2043,21 +2043,21 @@
 
             if not self._runner.options.noskips:
                 for test, msg in result.skipped:
-                    formatted = 'Skipped %s: %s' % (test.name, msg)
+                    formatted = 'Skipped %s: %s\n' % (test.name, msg)
                     if result.color:
                         formatted = pygments.highlight(
                             formatted,
                             runnerlexer,
-                            runnerformatter).strip("\n")
-                    self.stream.writeln(formatted)
+                            runnerformatter)
+                    self.stream.write(formatted)
             for test, msg in result.failures:
-                formatted = 'Failed %s: %s' % (test.name, msg)
+                formatted = 'Failed %s: %s\n' % (test.name, msg)
                 if result.color:
                     formatted = pygments.highlight(
                         formatted,
                         runnerlexer,
-                        runnerformatter).strip("\n")
-                self.stream.writeln(formatted)
+                        runnerformatter)
+                self.stream.write(formatted)
             for test, msg in result.errors:
                 self.stream.writeln('Errored %s: %s' % (test.name, msg))