()
| 86 | |
| 87 | |
| 88 | def test_timedelta_behavior(): |
| 89 | dt1 = pendulum.DateTime(2000, 11, 20, 1) |
| 90 | dt2 = pendulum.DateTime(2000, 11, 25, 2) |
| 91 | dt3 = pendulum.DateTime(2016, 11, 5, 3) |
| 92 | |
| 93 | p1 = pendulum.interval(dt1, dt3) |
| 94 | p2 = pendulum.interval(dt2, dt3) |
| 95 | it1 = p1.as_timedelta() |
| 96 | it2 = p2.as_timedelta() |
| 97 | |
| 98 | assert it1.total_seconds() == p1.total_seconds() |
| 99 | assert it2.total_seconds() == p2.total_seconds() |
| 100 | assert it1.days == p1.days |
| 101 | assert it2.days == p2.days |
| 102 | assert it1.seconds == p1.seconds |
| 103 | assert it2.seconds == p2.seconds |
| 104 | assert it1.microseconds == p1.microseconds |
| 105 | assert it2.microseconds == p2.microseconds |
| 106 | |
| 107 | |
| 108 | def test_different_timezones_same_time(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…