aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-05-27 12:41:54 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-05-27 12:41:54 +0200
commitbac73d22bcc35a1f15af1f04ed14c874b5113f37 (patch)
treee7bda57468552a3aac6f2ed99ba2688358edfd0b
parent3fb20f12ed07946b57fbcb20b71b95d727c4c868 (diff)
Fix tests after adding Nameless Age
-rwxr-xr-xdebdate8
1 files changed, 4 insertions, 4 deletions
diff --git a/debdate b/debdate
index c05d297..2615b30 100755
--- a/debdate
+++ b/debdate
@@ -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)