run-tests: include "\n" in formatted message instead of calling writeln()
authorYuya Nishihara <yuya@tcha.org>
Thu, 24 Aug 2017 22:09:57 +0900
changeset 33929 5d2ce90c71f1
parent 33928 6c119dbfd0c0
child 33930 f5d4bb8e944d
run-tests: include "\n" in formatted message instead of calling writeln() So we don't have to strip "\n" from pygments output.
tests/run-tests.py
--- 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))