If the two differing units aren't adjacent, only the first unit is displayed.
(self)
| 53 | ) |
| 54 | |
| 55 | def test_display_first_unit(self): |
| 56 | """ |
| 57 | If the two differing units aren't adjacent, only the first unit is |
| 58 | displayed. |
| 59 | """ |
| 60 | self.assertEqual( |
| 61 | timesince( |
| 62 | self.t, |
| 63 | self.t + 2 * self.oneweek + 3 * self.onehour + 4 * self.oneminute, |
| 64 | ), |
| 65 | "2\xa0weeks", |
| 66 | ) |
| 67 | self.assertEqual( |
| 68 | timesince(self.t, self.t + 4 * self.oneday + 5 * self.oneminute), |
| 69 | "4\xa0days", |
| 70 | ) |
| 71 | |
| 72 | def test_display_second_before_first(self): |
| 73 | """ |
nothing calls this directly
no test coverage detected