]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 17 Dec 2018 10:49:22 +0000 (02:49 -0800)
committerGitHub <noreply@github.com>
Mon, 17 Dec 2018 10:49:22 +0000 (02:49 -0800)
commit9ade4cbc0f54fc0e2970e4e202f09ab83f5e3b77
treea28f8c0f182b2ceb85e14827a8fa8fa61d776d09
parentbe69ff232df23b6ee165d7c34df5435d497cb79b
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.
(cherry picked from commit 8db5b54463118e5eb60cb3582e3108623f01f5df)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
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]