Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-11-30 14:44:30 +0300
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-12-03 09:20:13 +0300
commit30996479027464d252236b4e00fc62a5421a8296 (patch)
tree0cdede2ef8ea077ed973e4637f9c87606d18f94c /tools/test.py
parent32fed93aee30be5401ff99cfde3360ce037e294a (diff)
build: fix line length off by one error
While running the test suite the progress bar shows former line endings if the new line is shorter than the former line. The length was calculated without the line ending. It is now an empty string to prevent the off by one error instead of using extra whitespace. PR-URL: https://github.com/nodejs/node/pull/24748 Refs: https://github.com/nodejs/node/pull/24486 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'tools/test.py')
-rwxr-xr-xtools/test.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/test.py b/tools/test.py
index 640206f95cb..2366d490e24 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -423,7 +423,7 @@ class CompactProgressIndicator(ProgressIndicator):
}
status = self.Truncate(status, 78)
self.last_status_length = len(status)
- print(status, end=' ')
+ print(status, end='')
sys.stdout.flush()
@@ -438,7 +438,7 @@ class ColorProgressIndicator(CompactProgressIndicator):
super(ColorProgressIndicator, self).__init__(cases, flaky_tests_mode, templates)
def ClearLine(self, last_line_length):
- print("\033[1K\r", end=' ')
+ print("\033[1K\r", end='')
class MonochromeProgressIndicator(CompactProgressIndicator):
@@ -454,7 +454,7 @@ class MonochromeProgressIndicator(CompactProgressIndicator):
super(MonochromeProgressIndicator, self).__init__(cases, flaky_tests_mode, templates)
def ClearLine(self, last_line_length):
- print(("\r" + (" " * last_line_length) + "\r"), end=' ')
+ print(("\r" + (" " * last_line_length) + "\r"), end='')
PROGRESS_INDICATORS = {