time-machine
Run Python date-sensitive tests with a controlled clock.
adamchainz · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
In a Python virtual environment, install time-machine==3.6.0. Set an isolated synthetic date and read the clock within the fixture.
What we tested
3.6.0. Set an isolated synthetic date and read the clock within the fixture. Returned the fixture's exact configured UTC time.