summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-12-17 10:30:34 (GMT)
committerGitHub <noreply@github.com>2018-12-17 10:30:34 (GMT)
commit8db5b54463118e5eb60cb3582e3108623f01f5df (patch)
treebacd30bf9a8b946798ae30abf8c764d2c6f47d8d /Misc
parent2cf4c202ffeb30787c944365ba54013688b854c2 (diff)
downloadcpython-8db5b54463118e5eb60cb3582e3108623f01f5df.zip
cpython-8db5b54463118e5eb60cb3582e3108623f01f5df.tar.gz
cpython-8db5b54463118e5eb60cb3582e3108623f01f5df.tar.bz2
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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2018-12-16-23-28-49.bpo-35513.pn-Zh3.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-12-16-23-28-49.bpo-35513.pn-Zh3.rst b/Misc/NEWS.d/next/Library/2018-12-16-23-28-49.bpo-35513.pn-Zh3.rst
new file mode 100644
index 0000000..f1436a7
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-12-16-23-28-49.bpo-35513.pn-Zh3.rst
@@ -0,0 +1,4 @@
+:class:`~unittest.runner.TextTestRunner` of :mod:`unittest.runner` now uses
+:func:`time.perf_counter` rather than :func:`time.time` to measure the
+execution time of a test: :func:`time.time` can go backwards, whereas
+:func:`time.perf_counter` is monotonic.