From 797cb13c05ddc53a2757c3084dc98dd987652715 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sun, 28 Aug 2022 16:24:45 +0200 Subject: [PATCH] tools: don't use f-strings in test.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #43954 introduced the use of f-strings to `test.py` making the script only work with python versions >= 3.6. Remove that use to make it compatible again with older python versions. PR-URL: https://github.com/nodejs/node/pull/44407 Reviewed-By: Darshan Sen Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- tools/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test.py b/tools/test.py index 691f9c0fb9aa58..ad26cd54072a28 100755 --- a/tools/test.py +++ b/tools/test.py @@ -227,7 +227,7 @@ def RunSingle(self, parallel, thread_id): if self.measure_flakiness: outputs = [case.Run() for _ in range(self.measure_flakiness)] # +1s are there because the test already failed once at this point. - print(f" failed {len([i for i in outputs if i.UnexpectedOutput()]) + 1} out of {self.measure_flakiness + 1}") + print(" failed %d out of %d" % (len([i for i in outputs if i.UnexpectedOutput()]) + 1, self.measure_flakiness + 1)) else: self.succeeded += 1 self.remaining -= 1