-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Replace freezegun with time-machine #28193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it. I've read https://github.com/adamchainz/time-machine and it's a cool, nice, small library. Much better and more versatile than freezegun, and I love the time_travel metapherore much more than the freezegun's one (who needs guns).
Kudos to the author for Delorean example in the docs in case you missed it.
|
Ci no likey! Local was fine. Curious. |
|
My guess is some |
|
It's an odd one: This combo of tests fails locally:
I don't quite know what in that test is leaking state either! |
|
OH! Main is broken with that test! Which you've just reverted :D |
320340d to
ccb88fa
Compare
ceee216 to
10b311e
Compare
The primary driver for this was a niggle that the durations output for one test was reporting over 52 years: > 1670340356.40s call tests/jobs/test_base_job.py::TestBaseJob::test_heartbeat It turns out this was caused by freezegun, but time_machine fixes this. It also might be a bit faster, but that isn't a noticeable difference for us. (No runtime difference for the changed files, but it does make collection quicker: from 10s to 8s)
10b311e to
b6aee61
Compare
The primary driver for this was a niggle that the durations output for one test was reporting over 52 years: > 1670340356.40s call tests/jobs/test_base_job.py::TestBaseJob::test_heartbeat It turns out this was caused by freezegun, but time_machine fixes this. It also might be a bit faster, but that isn't a noticeable difference for us. (No runtime difference for the changed files, but it does make collection quicker: from 10s to 8s) (cherry picked from commit 4d0fd8e)
The primary driver for this was a niggle that the durations output for
one test was reporting over 52 years:
It turns out this was caused by freezegun, but time_machine fixes this.
It also might be a bit faster, but that isn't a noticeable difference for
us. (No runtime difference for the changed files, but it does make
collection quicker: from 10s to 8s)