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

Function test_dst_transition

tests/interval/test_construct.py:72–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70
71
72def test_dst_transition():
73 start = pendulum.datetime(2017, 3, 7, tz="America/Toronto")
74 end = start.add(days=6)
75 interval = end - start
76
77 assert interval.days == 5
78 assert interval.seconds == 82800
79
80 assert interval.remaining_days == 6
81 assert interval.hours == 0
82 assert interval.remaining_seconds == 0
83
84 assert interval.in_days() == 6
85 assert interval.in_hours() == 5 * 24 + 23
86
87
88def test_timedelta_behavior():

Callers

nothing calls this directly

Calls 4

in_hoursMethod · 0.80
datetimeMethod · 0.45
addMethod · 0.45
in_daysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…