]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)
authorVictor Stinner <vstinner@redhat.com>
Mon, 17 Dec 2018 10:30:34 +0000 (11:30 +0100)
committerGitHub <noreply@github.com>
Mon, 17 Dec 2018 10:30:34 +0000 (11:30 +0100)
commit8db5b54463118e5eb60cb3582e3108623f01f5df
treebacd30bf9a8b946798ae30abf8c764d2c6f47d8d
parent2cf4c202ffeb30787c944365ba54013688b854c2
bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)

TextTestRunner of unittest.runner now uses time.perf_counter() rather
than time.time() to measure the execution time of a test: time.time()
can go backwards, whereas time.perf_counter() is monotonic.

Similar change made in libregrtest, pprint and random.
Lib/pprint.py
Lib/random.py
Lib/test/libregrtest/runtest.py
Lib/test/time_hashlib.py
Lib/unittest/runner.py
Misc/NEWS.d/next/Library/2018-12-16-23-28-49.bpo-35513.pn-Zh3.rst [new file with mode: 0644]