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

Function test_closest

tests/time/test_comparison.py:124–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122
123
124def test_closest():
125 instance = pendulum.time(12, 34, 56)
126 t1 = pendulum.time(12, 34, 54)
127 t2 = pendulum.time(12, 34, 59)
128 closest = instance.closest(t1, t2)
129 assert t1 == closest
130
131 closest = instance.closest(t2, t1)
132 assert t1 == closest
133
134
135def test_closest_with_time():

Callers

nothing calls this directly

Calls 2

timeMethod · 0.80
closestMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…