Alex
Alex
+1 on this. Is not obvious how to inject dynamic context, ej. use the documentation [snippet](http://cookiecutter.readthedocs.org/en/latest/advanced_usage.html#example-injecting-a-timestamp) on the pre_gen_project hook may cause an 'infinite' prompt for values loop.
@adamchainz sadly I'm trying this right now and does not seem to work 😢 ``` def test_cache_expiration(self,...): frozen_time = pytz.UTC.localize(datetime.datetime(2023, 11, 23, 14, 52)) with time_machine.travel(frozen_time, tick=False) as travel_time: print(datetime.datetime.now())...
Ummmmm, should I open a discussion on [time-machine](https://github.com/adamchainz/time-machine) or in [fakeredis ](https://github.com/cunla/fakeredis-py/) ? Definitively, thanks for your response @adamchainz
> @slothyrulez Hmm I am afraid I can't see why exactly. It looks like fakeredis (the new maintained repo) calls `time.time()` on each command: https://github.com/cunla/fakeredis-py/blob/04d4703d6bf7bc7c9d98d2d128cd206de80787b3/fakeredis/_basefakesocket.py#L271 > > time-machine definitely mocks...
Cross-posting here for future visibility https://github.com/cunla/fakeredis-py/issues/253 Thanks @jamesls and sorry for the noise
Something similar here: ``` ❯ uname -a Linux micri 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux ❯ mcfly -V mcfly 0.8.5 ``` CTRL+r...