Skip to content

Commit

Permalink
tools: fix TypeError from test.py --time
Browse files Browse the repository at this point in the history
Calculated durations are timedelta objects but the FormatTime function
is expecting a number in seconds.

PR-URL: #20368
Fixes: #20341
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
richardlau authored and trivikr committed May 3, 2018
1 parent 516349d commit ab15198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1747,7 +1747,7 @@ def DoSkip(case):
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

Expand Down

0 comments on commit ab15198

Please sign in to comment.