From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Legoll Subject: Re: Need help fixing testcases with time-difference Date: Thu, 18 Aug 2016 10:59:20 +0200 Message-ID: References: <57B56C3D.4050705@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baJAY-00062S-QW for guix-devel@gnu.org; Thu, 18 Aug 2016 04:59:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1baJAX-0002Mv-NW for guix-devel@gnu.org; Thu, 18 Aug 2016 04:59:22 -0400 Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]:35467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baJAX-0002Mp-Iq for guix-devel@gnu.org; Thu, 18 Aug 2016 04:59:21 -0400 Received: by mail-qk0-x230.google.com with SMTP id v123so10233657qkh.2 for ; Thu, 18 Aug 2016 01:59:21 -0700 (PDT) In-Reply-To: <57B56C3D.4050705@crazy-compilers.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel Hello, On Thu, Aug 18, 2016 at 10:05 AM, Hartmut Goebel wrote: > Hi, > > I'm currently working on django, the web application framework. > Unfortunalty some tests fail. These are all testing time- and timezone > calculations. > > Failures are like this: > > AssertionError: datetime.timedelta(0, 3600, 16) not less than > datetime.timedelta(0, 2) > > which means the returned time difference is ca. 1 hour, but allowed are > only 2 minutes. The testcase os this one > https://github.com/django/django/blob/master/tests/file_storage/tests.py#L239> > > I already added tzdata to native-inputs, but this does not solve the issue. > > Any hints? That looks like a Daylight Saving Time mismatch, could that be possible ? DST is 1h delta, which would be datetime.timedelta(0, 3600), thus if we remove that, the test assertion becomes true... >>> assert datetime.timedelta(0, 3600, 16) < datetime.timedelta(0, 2) Traceback (most recent call last): File "", line 1, in AssertionError >>> assert (datetime.timedelta(0, 3600, 16) - datetime.timedelta(0, 3600)) < datetime.timedelta(0, 2) WDYT? -- Vincent Legoll