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

Function test_subtract_timedelta

tests/time/test_sub.py:52–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51
52def test_subtract_timedelta():
53 delta = timedelta(seconds=16, microseconds=654321)
54 d = Time(3, 12, 15, 777777)
55
56 d = d.subtract_timedelta(delta)
57 assert d.minute == 11
58 assert d.second == 59
59 assert d.microsecond == 123456
60
61 d = Time(3, 12, 15, 777777)
62
63 d = d - delta
64 assert d.minute == 11
65 assert d.second == 59
66 assert d.microsecond == 123456
67
68
69def test_add_timedelta_with_days():

Callers

nothing calls this directly

Calls 2

subtract_timedeltaMethod · 0.95
TimeClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…