Skip to content

[3.7] bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)#11188

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-8db5b54-3.7
Dec 17, 2018
Merged

[3.7] bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)#11188
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-8db5b54-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented Dec 17, 2018

Copy link
Copy Markdown
Contributor

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 8db5b54)

Co-authored-by: Victor Stinner vstinner@redhat.com

https://bugs.python.org/issue35513

…H-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 8db5b54)

Co-authored-by: Victor Stinner <vstinner@redhat.com>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 9ade4cb into python:3.7 Dec 17, 2018
@miss-islington miss-islington deleted the backport-8db5b54-3.7 branch December 17, 2018 10:49
@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants