mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)
* Enhance also format_duration(): work on integers and rounds towards +infinity (math.ceil). * Write unit tests on format_duration()
This commit is contained in:
parent
dfa9643d29
commit
4ffe9c2b25
3 changed files with 44 additions and 10 deletions
|
@ -200,7 +200,7 @@ def run_tests_multiprocess(regrtest):
|
|||
if (ok not in (CHILD_ERROR, INTERRUPTED)
|
||||
and test_time >= PROGRESS_MIN_TIME
|
||||
and not regrtest.ns.pgo):
|
||||
text += ' (%.0f sec)' % test_time
|
||||
text += ' (%s)' % format_duration(test_time)
|
||||
elif ok == CHILD_ERROR:
|
||||
text = '%s (%s)' % (text, test_time)
|
||||
running = get_running(workers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue