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

Function test_range

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

Source from the content-addressed store, hash-verified

7
8
9def test_range():
10 dt1 = pendulum.datetime(2000, 1, 1, 12, 45, 37)
11 dt2 = pendulum.datetime(2000, 1, 31, 12, 45, 37)
12
13 p = Interval(dt1, dt2)
14 r = list(p.range("days"))
15
16 assert len(r) == 31
17 assert_datetime(r[0], 2000, 1, 1, 12, 45, 37)
18 assert_datetime(r[-1], 2000, 1, 31, 12, 45, 37)
19
20
21def test_range_no_overflow():

Callers

nothing calls this directly

Calls 4

rangeMethod · 0.95
IntervalClass · 0.90
assert_datetimeFunction · 0.90
datetimeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…