MCPcopy
hub / github.com/celery/celery / test_tz_when_zoneinfo

Method test_tz_when_zoneinfo

t/unit/utils/test_time.py:242–245  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

240 assert wtz.tzinfo == tz
241
242 def test_tz_when_zoneinfo(self):
243 tz = ZoneInfo('US/Eastern')
244 wtz = make_aware(datetime.now(_timezone.utc), tz)
245 assert wtz.tzinfo == tz
246
247 def test_maybe_make_aware(self):
248 aware = datetime.now(_timezone.utc).replace(tzinfo=timezone.utc)

Callers

nothing calls this directly

Calls 2

make_awareFunction · 0.90
nowMethod · 0.45

Tested by

no test coverage detected