-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #16 - Incorrect test duration with freezegun
freezegun is a Python library used to set the date/time returned by the Python date/time functions to make testing time-sensitive code easier. time.time() is used here to measure the duration of test cases, if freezegun was in use then the time returned by this could be the time the test had set up, rather than the actual time. This lead to test durations being reported as negative (if frozen time is in the past), or much longer than expected (if fronzen time is in the future). freezegun exposes the unmodified time.time() via an alias. This changes TimingSuite so that it uses this alias if freezegun is installed.
- Loading branch information
1 parent
dee5dfd
commit 91202a6
Showing
5 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters