0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00

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 <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
Richard Lau 2018-04-27 14:17:30 -04:00 committed by Trivikram Kamat
parent 516349d99c
commit ab15198471

View File

@ -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