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

Function test_subtraction

tests/datetime/test_diff.py:839–845  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

837
838
839def test_subtraction():
840 d = pendulum.naive(2016, 7, 5, 12, 32, 25, 0)
841 future_dt = datetime(2016, 7, 5, 13, 32, 25, 0)
842 future = d.add(hours=1)
843
844 assert (future - d).total_seconds() == 3600
845 assert (future_dt - d).total_seconds() == 3600
846
847
848def test_subtraction_aware_naive():

Callers

nothing calls this directly

Calls 4

datetimeFunction · 0.85
naiveMethod · 0.80
addMethod · 0.45
total_secondsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…