MCPcopy
hub / github.com/celery/celery / test_to_local

Method test_to_local

t/unit/app/test_beat.py:948–955  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

946 assert d2.tzinfo
947
948 def test_to_local(self):
949 x = schedule(10, app=self.app)
950 x.utc_enabled = True
951 d = x.to_local(datetime.now())
952 assert d.tzinfo is None
953 x.utc_enabled = False
954 d = x.to_local(datetime.now(timezone.utc))
955 assert d.tzinfo

Callers

nothing calls this directly

Calls 3

scheduleClass · 0.90
to_localMethod · 0.45
nowMethod · 0.45

Tested by

no test coverage detected