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

Function test_range_amount

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

Source from the content-addressed store, hash-verified

106
107
108def test_range_amount():
109 dt1 = pendulum.datetime(2016, 10, 14, tz="America/Sao_Paulo")
110 dt2 = dt1.add(weeks=1)
111
112 p = pendulum.interval(dt1, dt2)
113 r = list(p.range("days", 2))
114
115 assert len(r) == 4
116 assert_datetime(r[0], 2016, 10, 14, 0, 0, 0)
117 assert_datetime(r[1], 2016, 10, 16, 1, 0, 0)
118 assert_datetime(r[2], 2016, 10, 18, 0, 0, 0)
119 assert_datetime(r[3], 2016, 10, 20, 0, 0, 0)

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…