-
Notifications
You must be signed in to change notification settings - Fork 269
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
move_to not supported when ticks enabled #350
Comments
Thanks for opening! I am marking this as an enhancement. |
is it really an enhancement? The docs say this should work. Btw here's my hack around it: class WraptTickingDateTimeFactory(wrapt.ObjectProxy):
# https://github.com/spulec/freezegun/issues/350
def move_to(self, target_datetime):
"""Moves frozen date to the given ``target_datetime``"""
self.__wrapped__.time_to_freeze = freezegun.api._parse_time_to_freeze(target_datetime)
self.__wrapped__.start = freezegun.api.real_datetime.now()
if isinstance(frozen_datetime, freezegun.api.TickingDateTimeFactory):
frozen_datetime = WraptTickingDateTimeFactory(frozen_datetime) |
What's the status of this? It's really frustrating, especially when used together with |
The status is there is no PR to fix it. |
We need a PR! :) |
Created a PR for this - #533 |
it seems like only
StepTickTimeFactory
andFrozenDateTimeFactory
have this method enabled but notTickingDateTimeFactory
The text was updated successfully, but these errors were encountered: