From bac73d22bcc35a1f15af1f04ed14c874b5113f37 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sat, 27 May 2017 12:41:54 +0200 Subject: Fix tests after adding Nameless Age --- debdate | 8 ++++---- 1 file 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) -- cgit v1.2.3