diff options
-rwxr-xr-x | debdate | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -62,7 +62,7 @@ class DebDate: releases = [] self.releases.sort(key=lambda x: x[0], reverse=True) if not self.releases: - self.releases = RELEASES + self.releases = RELEASES.copy() if nameless_age: self.releases.append(( nameless_age, @@ -106,7 +106,7 @@ class TestDebDate(unittest.TestCase): def testFirstYearRelease(self): for debdate in self.debdates: - r = debdate.releases[-1] + r = debdate.releases[-2] d = r[0] + relativedelta.relativedelta(days=10) data = debdate.get_release(d) self.assertEqual(data['dody'], 10) @@ -115,7 +115,7 @@ class TestDebDate(unittest.TestCase): def testSecondYearRelease(self): for debdate in self.debdates: - r = debdate.releases[-6] + r = debdate.releases[-7] d = r[0] + relativedelta.relativedelta(years=1) data = debdate.get_release(d) self.assertEqual(data['dody'], 227) @@ -124,7 +124,7 @@ class TestDebDate(unittest.TestCase): def testJanuarySecondYearRelease(self): for debdate in self.debdates: - r = debdate.releases[-6] + r = debdate.releases[-7] d = datetime.date(r[0].year + 1, 1, 1) data = debdate.get_release(d) self.assertEqual(data['dody'], 1) |