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

Function test_range_months_overflow

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

Source from the content-addressed store, hash-verified

83
84
85def test_range_months_overflow():
86 dt1 = pendulum.datetime(2016, 1, 30, tz="America/Sao_Paulo")
87 dt2 = dt1.add(months=4)
88
89 p = pendulum.interval(dt1, dt2)
90 r = list(p.range("months"))
91
92 assert_datetime(r[0], 2016, 1, 30, 0, 0, 0)
93 assert_datetime(r[-1], 2016, 5, 30, 0, 0, 0)
94
95
96def test_range_with_dst():

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…