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
- Freeze time doesn't work with FastAPI + pydantic V2
- Fix local timezone and timezone related conversions
- Handle rest_framework.throttling.SimpleRateThrottle
- Does not mock time for TTLCache
- `freeze_time` doesn't work with pydantic
- time.localtime still uses original timezone information
- Time zone context manager?
- host timezone can't be faked
- Occasional `IndexError` when accessing `tz_offsets[-1]`
- FakeDatetime timestamps don't match those generated from real datetime in some instances.
- Docs
- Python not yet supported