Package: parsedatetime / 2.1-3+deb9u1

0001-Fix-delta-test-by-using-a-static-source-time.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 56980ebc6028b129adfa8b359b03247de82c9a3c Mon Sep 17 00:00:00 2001
From: Brian May <bam@debian.org>
Date: Sat, 11 Mar 2017 11:44:54 +1100
Subject: Fix delta test by using a static source time

Apply patch from upstream:
https://github.com/bear/parsedatetime/commit/76a97697e3611356b848f0aa7c759ff80fd7bd4c

Without this patch, the tests would fail immediately after February, as
February only has 28 days, and the tests currently assume months have 30
days.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856625
https://github.com/bear/parsedatetime/issues/215
---
 tests/TestDelta.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/TestDelta.py b/tests/TestDelta.py
index c628d5e..a54aee1 100644
--- a/tests/TestDelta.py
+++ b/tests/TestDelta.py
@@ -13,9 +13,7 @@ class test(unittest.TestCase):
 
     def setUp(self):
         self.cal = pdt.Calendar(version=pdt.VERSION_CONTEXT_STYLE)
-        self.source = (self.yr, self.mth, self.dy,
-                       self.hr, self.mn, self.sec,
-                       self.wd, self.yd, self.isdst) = time.localtime()
+        self.source = (2017, 1, 1, 7, 1, 2, 6, 1, 1)
 
     def assertDelta(self, ts, years=None, months=None, **deltakw):
         ts = ts[0]