diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2017-05-27 12:41:54 +0200 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2017-05-27 12:41:54 +0200 |
commit | bac73d22bcc35a1f15af1f04ed14c874b5113f37 (patch) | |
tree | e7bda57468552a3aac6f2ed99ba2688358edfd0b | |
parent | 3fb20f12ed07946b57fbcb20b71b95d727c4c868 (diff) |
Fix tests after adding Nameless Age
-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) |