MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / freeze

Method freeze

src/pendulum/testing/traveller.py:72–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70 self._coordinates: time_machine.Coordinates | None = None
71
72 def freeze(self) -> Self:
73 if self._started:
74 cast("time_machine.Coordinates", self._coordinates).move_to(
75 self._datetime_class.now(), tick=False
76 )
77 else:
78 self._start(freeze=True)
79
80 return self
81
82 def travel_back(self) -> Self:
83 if not self._started:

Callers 2

freezeFunction · 0.45
test_freezeFunction · 0.45

Calls 2

_startMethod · 0.95
nowMethod · 0.80

Tested by 1

test_freezeFunction · 0.36