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

Function test_dst_fold_attribute_is_honored

tests/tz/test_timezone.py:339–349  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

337
338
339def test_dst_fold_attribute_is_honored():
340 tz = pendulum.timezone("US/Eastern")
341 dt = datetime(2014, 11, 2, 1, 30)
342
343 offset = tz.dst(dt)
344
345 assert offset.total_seconds() == 3600
346
347 offset = tz.dst(dt.replace(fold=1))
348
349 assert offset.total_seconds() == 0
350
351
352def test_tzname_fold_attribute_is_honored():

Callers

nothing calls this directly

Calls 5

datetimeFunction · 0.85
timezoneMethod · 0.80
dstMethod · 0.80
total_secondsMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…