freezegun icon indicating copy to clipboard operation
freezegun copied to clipboard

Feature request: allow it to accept no datetime and default to `utcnow`

Open gdalmau opened this issue 2 years ago • 0 comments

Description

It would be good to be able to use this context manager/decorator as a way to tell the tests to just freeze time without having to specify any datetime.

Currently it accepts None as a possible value and it defaults to .utcnow(), so it looks like the implementation should be trivial:

https://github.com/spulec/freezegun/blob/33fdce860fc72d7cea1c61c6e806245cc0dc96dc/freezegun/api.py#L460-L465

gdalmau avatar Jan 23 '23 15:01 gdalmau