-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Flag that we're time traveling, with access to true datetime #206
Comments
You can get the real time with time-machine/src/time_machine/__init__.py Lines 349 to 353 in 29a9f0a
And you can check if time travelling based upon whether Can you check those works for you first? Then we could add an official API. |
That worked perfectly. Thanks! Having it officially supported via the API would be awesome. I can work on a PR next week. |
I added |
https://build.opensuse.org/request/show/945538 by user dirkmueller + dimstar_suse - update to version 2.6.0: * Drop Python 3.6 support. - update to version 2.5.0: * Add ``time_machine.escape_hatch``, which provides functions to bypass time-machine. Thanks to Matt Pegler for the feature request in `Issue #206 <https://github.com/adamchainz/time-machine/issues/206>`__.
Description
In some of our integration tests we make API calls to external services. Some of these require a timestamp for use in authentication. I know that excluding some modules from time-machine isn't possible due to the implementation, but having some signal that we're time traveling would suffice, along with access to the unpatched datetime module.
The text was updated successfully, but these errors were encountered: