()
| 296 | |
| 297 | |
| 298 | def test_closest_with_datetime(): |
| 299 | instance = pendulum.datetime(2015, 5, 28, 12, 0, 0) |
| 300 | dt1 = datetime(2015, 5, 28, 11, 0, 0) |
| 301 | dt2 = datetime(2015, 5, 28, 14, 0, 0) |
| 302 | closest = instance.closest(dt1, dt2) |
| 303 | assert_datetime(closest, 2015, 5, 28, 11, 0, 0) |
| 304 | |
| 305 | dts = [ |
| 306 | pendulum.datetime(2015, 5, 28, 16, 0, 0) + pendulum.duration(hours=x) |
| 307 | for x in range(4) |
| 308 | ] |
| 309 | closest = instance.closest(dt1, dt2, *dts) |
| 310 | |
| 311 | assert_datetime(closest, 2015, 5, 28, 11, 0, 0) |
| 312 | |
| 313 | |
| 314 | def test_closest_with_equals(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…