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 MylesBorins committed Aug 17, 2018
1 parent 24a105f commit 246c2d1
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 @@ -1745,7 +1745,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 246c2d1

Please sign in to comment.