freezegun
https://github.com/spulec/freezegun
Python
Let your Python tests travel through time
Triage Issues!
When you volunteer to triage issues, you'll receive an email each day with a link to an open issue that needs help in this project. You'll also receive instructions on how to triage issues.
Triage Docs!
Receive a documented method or class from your favorite GitHub repos in your inbox every day. If you're really pro, receive undocumented methods or classes and supercharge your commit history.
Python not yet supported1 Subscribers
Add a CodeTriage badge to freezegun
Help out
- Issues
- 'datetime.datetime' object has no attribute '_tz_offset'
- switch to get_running_loop as get_event_loop is deprecated in python 3.10
- freezegun not working as expected with pytest --import-mode=importlib
- fixture 'frozen_time' not found
- Using freeze_time on a class prevents breaks class inheritance
- Does not mock time for TTLCache
- `freeze_time` doesn't work with pydantic
- Timezone America/Sao_Paulo triggers recursion errors in tests.
- Datetime and Time packages do not have the same behavior when being frozen
- Respect System Timezone
- Docs
- Python not yet supported