()
| 312 | |
| 313 | |
| 314 | def test_closest_with_equals(): |
| 315 | instance = pendulum.datetime(2015, 5, 28, 12, 0, 0) |
| 316 | dt1 = pendulum.datetime(2015, 5, 28, 12, 0, 0) |
| 317 | dt2 = pendulum.datetime(2015, 5, 28, 14, 0, 0) |
| 318 | closest = instance.closest(dt1, dt2) |
| 319 | assert closest == dt1 |
| 320 | |
| 321 | |
| 322 | def test_farthest(): |