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

Function test_as_timedelta

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

Source from the content-addressed store, hash-verified

83
84
85def test_as_timedelta():
86 pi = pendulum.duration(seconds=3456.123456)
87 assert_duration(pi, 0, 0, 0, 0, 0, 57, 36, 123456)
88 delta = pi.as_timedelta()
89 assert isinstance(delta, timedelta)
90 assert delta.total_seconds() == 3456.123456
91 assert delta.seconds == 3456
92
93
94def test_float_years_and_months():

Callers

nothing calls this directly

Calls 3

assert_durationFunction · 0.90
as_timedeltaMethod · 0.80
total_secondsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…