()
| 360 | |
| 361 | |
| 362 | def 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 | |
| 377 | def test_is_same_day(): |