mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-109162: libregrtest: add Logger class (#109212)
* Add Logger class in a new logger.py file. * Move Regrtest attributes to Logger: * start_time * test_count_text * test_count_width * win_load_tracker * Move Regrtest method to Logger: * log() * getloadavg(): rename to get_load_avg() * set_tests() * Add methods to the Logger class: * start_load_tracker() * stop_load_tracker()
This commit is contained in:
parent
db5bfe91f8
commit
0eab2427b1
4 changed files with 123 additions and 99 deletions
|
@ -6,6 +6,9 @@ import textwrap
|
|||
from test import support
|
||||
|
||||
|
||||
MS_WINDOWS = (sys.platform == 'win32')
|
||||
|
||||
|
||||
def format_duration(seconds):
|
||||
ms = math.ceil(seconds * 1e3)
|
||||
seconds, ms = divmod(ms, 1000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue