[Django] #21756: utils_tests.test_dateformat.DateFormatTests failing on Windows with pytz installed

11 views
Skip to first unread message

Django

unread,
Jan 9, 2014, 12:08:44 AM1/9/14
to django-...@googlegroups.com
#21756: utils_tests.test_dateformat.DateFormatTests failing on Windows with pytz
installed
-----------------------------------+--------------------
Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------
Running {{{python runtests.py --noinput --settings=test_sqlite
utils_tests.test_dateformat}}}

With pytz installed:

{{{
======================================================================
FAIL: test_datetime_with_local_tzinfo
(utils_tests.test_dateformat.DateFormatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\project\django\django\tests\utils_tests\test_dateformat.py",
line 38, in test_datetime_with_local_tzinfo
self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U'))),
dt.replace(tzinfo=None))
AssertionError: datetime.datetime(2009, 5, 15, 23, 30, 30) !=
datetime.datetime(2009, 5, 16, 5, 30, 30)

======================================================================
FAIL: test_datetime_with_tzinfo
(utils_tests.test_dateformat.DateFormatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\project\django\django\tests\utils_tests\test_dateformat.py",
line 47, in test_datetime_with_tzinfo
self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U'))),
dt.astimezone(ltz).replace(tzinfo=None))
AssertionError: datetime.datetime(2009, 5, 15, 23, 30, 30) !=
datetime.datetime(2009, 5, 16, 5, 30, 30)

----------------------------------------------------------------------
Ran 13 tests in 0.134s

FAILED (failures=2)
}}}

With pytz uninstalled:

{{{
Creating test database for alias 'default'...
Creating test database for alias 'other'...
.............
----------------------------------------------------------------------
Ran 13 tests in 0.013s

OK
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21756>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 9, 2014, 12:17:15 AM1/9/14
to django-...@googlegroups.com
#21756: utils_tests.test_dateformat.DateFormatTests failing on Windows with pytz
installed
-----------------------------------+--------------------------------------

Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by manfre):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Broken by d9413d33b2a8371731a92289123683cf6f440290 from #17262

--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:1>

Django

unread,
Jan 9, 2014, 12:19:57 AM1/9/14
to django-...@googlegroups.com
#21756: utils_tests.test_dateformat.DateFormatTests failing on Windows with pytz
installed
---------------------------------+------------------------------------

Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: master
Severity: Release blocker | Resolution:
Keywords: timezone tzinfo | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by manfre):

* keywords: => timezone tzinfo
* component: Testing framework => Utilities
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

Marking my own ticket as accepted and a release blocker because it's a
bisected regression.

--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:2>

Django

unread,
Jan 9, 2014, 1:42:20 AM1/9/14
to django-...@googlegroups.com
#21756: utils_tests.test_dateformat.DateFormatTests failing on Windows with pytz
installed
---------------------------------+-------------------------------------
Reporter: manfre | Owner: aaugustin
Type: Bug | Status: assigned

Component: Utilities | Version: master
Severity: Release blocker | Resolution:
Keywords: timezone tzinfo | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by aaugustin):

* owner: nobody => aaugustin
* status: new => assigned


Comment:

It's probably just a matter of skipping these tests, Windows can't use a
time zone other than the system time zone.

--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:3>

Django

unread,
Jan 12, 2014, 3:25:45 AM1/12/14
to django-...@googlegroups.com
#21756: utils_tests.test_dateformat.DateFormatTests failing on Windows with pytz
installed
---------------------------------+-------------------------------------
Reporter: manfre | Owner: aaugustin
Type: Bug | Status: assigned
Component: Utilities | Version: master
Severity: Release blocker | Resolution:
Keywords: timezone tzinfo | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------

Comment (by aaugustin):

Affected tests use 'Europe/Copenhagen', which is the same as
'Europe/Paris'; that's why I didn't notice the issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:4>

Django

unread,
Jan 12, 2014, 3:42:28 AM1/12/14
to django-...@googlegroups.com
#21756: utils_tests.test_dateformat.DateFormatTests failing on Windows with pytz
installed
---------------------------------+-------------------------------------
Reporter: manfre | Owner: aaugustin
Type: Bug | Status: closed
Component: Utilities | Version: master
Severity: Release blocker | Resolution: fixed

Keywords: timezone tzinfo | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by Aymeric Augustin <aymeric.augustin@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"9cc3371a0f45894de12d2fb60a57afd111fb9c3e"]:
{{{
#!CommitTicketReference repository=""
revision="9cc3371a0f45894de12d2fb60a57afd111fb9c3e"
Fixed #21756 -- Skipped two timezone-related tests on Windows.

Windows cannot use a time zone other than the default time zone.

Thanks manfre for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21756#comment:5>

Reply all
Reply to author
Forward
0 new messages