From ab15198471cdd62b9c98619b033ac17f0f56d01e Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 27 Apr 2018 14:17:30 -0400 Subject: tools: fix TypeError from `test.py --time` Calculated durations are timedelta objects but the FormatTime function is expecting a number in seconds. PR-URL: https://github.com/nodejs/node/pull/20368 Fixes: https://github.com/nodejs/node/issues/20341 Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat --- tools/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/test.py') diff --git a/tools/test.py b/tools/test.py index a0a3121e48..66b9c7291f 100755 --- a/tools/test.py +++ b/tools/test.py @@ -1747,7 +1747,7 @@ def Main(): timed_tests.sort(lambda a, b: a.CompareTime(b)) index = 1 for entry in timed_tests[:20]: - t = FormatTime(entry.duration) + t = FormatTime(entry.duration.total_seconds()) sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) index += 1 -- cgit v1.2.3