()
| 140 | |
| 141 | |
| 142 | def test_is_anniversary(): |
| 143 | d = pendulum.Date.today() |
| 144 | an_anniversary = d.subtract(years=1) |
| 145 | assert an_anniversary.is_anniversary() |
| 146 | not_an_anniversary = d.subtract(days=1) |
| 147 | assert not not_an_anniversary.is_anniversary() |
| 148 | also_not_an_anniversary = d.add(days=2) |
| 149 | assert not also_not_an_anniversary.is_anniversary() |
| 150 | |
| 151 | d1 = pendulum.Date(1987, 4, 23) |
| 152 | d2 = pendulum.Date(2014, 9, 26) |
| 153 | d3 = pendulum.Date(2014, 4, 23) |
| 154 | assert not d2.is_anniversary(d1) |
| 155 | assert d3.is_anniversary(d1) |
| 156 | |
| 157 | |
| 158 | def test_is_birthday(): # backward compatibility |
nothing calls this directly
no test coverage detected
searching dependent graphs…