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

Function test_farthest_with_equals

tests/datetime/test_comparison.py:362–374  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

360
361
362def test_farthest_with_equals():
363 instance = pendulum.datetime(2015, 5, 28, 12, 0, 0)
364 dt1 = pendulum.datetime(2015, 5, 28, 12, 0, 0)
365 dt2 = pendulum.datetime(2015, 5, 28, 14, 0, 0)
366 farthest = instance.farthest(dt1, dt2)
367 assert farthest == dt2
368
369 dts = [
370 pendulum.datetime(2015, 5, 28, 16, 0, 0) + pendulum.duration(hours=x)
371 for x in range(4)
372 ]
373 farthest = instance.farthest(dt1, dt2, *dts)
374 assert farthest == dts[-1]
375
376
377def test_is_same_day():

Callers

nothing calls this directly

Calls 2

datetimeMethod · 0.45
farthestMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…