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

Function test_range_with_dst

tests/interval/test_range.py:96–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94
95
96def test_range_with_dst():
97 dt1 = pendulum.datetime(2016, 10, 14, tz="America/Sao_Paulo")
98 dt2 = dt1.add(weeks=1)
99
100 p = pendulum.interval(dt1, dt2)
101 r = list(p.range("days"))
102
103 assert_datetime(r[0], 2016, 10, 14, 0, 0, 0)
104 assert_datetime(r[2], 2016, 10, 16, 1, 0, 0)
105 assert_datetime(r[-1], 2016, 10, 21, 0, 0, 0)
106
107
108def test_range_amount():

Callers

nothing calls this directly

Calls 4

assert_datetimeFunction · 0.90
rangeMethod · 0.80
datetimeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…