[Django] #21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time fails on Windows with sqlite

5 views
Skip to first unread message

Django

unread,
Sep 25, 2013, 4:39:10 PM9/25/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+--------------------
Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: contrib.syndication | Version: master
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+--------------------
{{{
(django) C:\projects\django\django>python tests\runtests.py
--settings=test_sqlite syndication.SyndicationFeedTest
Creating test database for alias 'default'...
Creating test database for alias 'other'...
....F........
======================================================================
FAIL: test_feed_last_modified_time
(regressiontests.syndication.tests.SyndicationFeedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"C:\projects\django\django\tests\regressiontests\syndication\tests.py",
line 231, in test_feed_last_modified_time
self.assertEqual(response['Last-Modified'], 'Thu, 03 Jan 2008 19:30:00
GMT')
AssertionError: 'Thu, 03 Jan 2008 18:30:00 GMT' != u'Thu, 03 Jan 2008
19:30:00 GMT'

----------------------------------------------------------------------
Ran 13 tests in 0.206s

FAILED (failures=1)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...
}}}

Test was added with 08d675a98f1ae1d27f7e1946125ed5316c576802, which is the
first failure.

{{{
08d675a98f1ae1d27f7e1946125ed5316c576802 is the first bad commit
commit 08d675a98f1ae1d27f7e1946125ed5316c576802
Author: Claude Paroz <cla...@2xlibre.net>
Date: Sun Sep 30 20:44:27 2012 +0200

Fixed #7936 -- Added Last-Modified header to feeds

Thanks julianb for the report and the initial patch, and Roman
Gladkov for working on tests.

:040000 040000 b758f8d1ae8118a97236121022e9837a9d84c482
48f931faa97115278e580cfe2c1a19341edd5bf1 M django
:040000 040000 ae5b21c9a1afb9dbb5376f309cbd9b029543f767
1451b9d60d4f856e0fdd33579b779363d959a083 M tests
}}}

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

Django

unread,
Sep 29, 2013, 6:20:57 AM9/29/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+-------------------------------------

Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: contrib.syndication | Version: master
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
Has patch: 0 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by xelnor):

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


Comment:

The failure on Windows comes from the lack of handling of non-system
timezones.

This is documented in the note on
https://docs.djangoproject.com/en/1.6/ref/settings/#time-zone ; if the
Windows system timezone is set to `America/Chicago`, the test passes.

Since this test doesn't try to check the naive to aware conversion of
dates for the `Last-Modified` header, I propose a patch that:
1) Uses the "timezone-aware" example feed, thus passing on Windows
2) Adds an extra test to check that the `Last-Modified` header is set
correctly for timezone-naive feeds; that test is skipped on Windows, just
like similar tests in `tests/timezones/tests.py`.

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

Django

unread,
Sep 29, 2013, 8:15:18 AM9/29/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+-------------------------------------

Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: contrib.syndication | Version: master
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
Has patch: 1 | Unreviewed

Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by xelnor):

* has_patch: 0 => 1


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

Django

unread,
Sep 29, 2013, 5:11:11 PM9/29/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+------------------------------------

Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: contrib.syndication | Version: master
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* stage: Unreviewed => Accepted


Comment:

I'd prefer to import `requires_tz_support` rather than duplicate its
definition. Otherwise this patch looks good.

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

Django

unread,
Oct 1, 2013, 7:21:18 AM10/1/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+------------------------------------

Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: contrib.syndication | Version: master
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by Claude Paroz <claude@…>):

In [changeset:"c1c44b25062c3a793ac0d8416f369383a4a58cb4"]:
{{{
#!CommitTicketReference repository=""
revision="c1c44b25062c3a793ac0d8416f369383a4a58cb4"
Factorized requires_tz_support decorator in test utils

Thanks Aymeric Augustin for the suggestion. Refs #21165.
}}}

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

Django

unread,
Oct 1, 2013, 7:30:21 AM10/1/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+------------------------------------

Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: contrib.syndication | Version: master
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by Claude Paroz <claude@…>):

In [changeset:"5b97b99a014443b255cf8ab0467864c5874027da"]:
{{{
#!CommitTicketReference repository=""
revision="5b97b99a014443b255cf8ab0467864c5874027da"
[1.6.x] Factorized requires_tz_support decorator in test utils

Thanks Aymeric Augustin for the suggestion. Refs #21165.

Backport of c1c44b2506 from master.
}}}

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

Django

unread,
Oct 1, 2013, 7:47:49 AM10/1/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+------------------------------------

Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: contrib.syndication | Version: master
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


Comment:

xelnor, could you update the patch (accessorily, the new test fails on my
system...)?

--
Ticket URL: <https://code.djangoproject.com/ticket/21165#comment:6>

Django

unread,
Oct 2, 2013, 10:33:34 PM10/2/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+------------------------------------
Reporter: manfre | Owner: nobody
Type: Bug | Status: closed
Component: contrib.syndication | Version: master
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by Ramiro Morales <cramm0@…>):

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


Comment:

In [changeset:"62dfd79f8b4a1f7e702809cc21ce262f19da0f5b"]:
{{{
#!CommitTicketReference repository=""
revision="62dfd79f8b4a1f7e702809cc21ce262f19da0f5b"
Fixed #21165 -- Fix test for syndication feed timestamp field on Windows.

Thanks Michael Manfre for the report, Raphaël Barrois for the patch and
Claude Paroz, Aymeric Augustin for the reviews.

Refs #7936.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21165#comment:7>

Django

unread,
Oct 3, 2013, 10:06:26 PM10/3/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+------------------------------------
Reporter: manfre | Owner: nobody
Type: Bug | Status: closed
Component: contrib.syndication | Version: master

Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------

Comment (by Ramiro Morales <ramiro@…>):

In [changeset:"5252885494079cf28a337644a87e61b19340f09c"]:
{{{
#!CommitTicketReference repository=""
revision="5252885494079cf28a337644a87e61b19340f09c"
[1.6.x] Fixed #21165 -- Fix test for syndication feed timestamp field on
Windows.

Thanks Michael Manfre for the report, Raphaël Barrois for the patch and
Claude Paroz, Aymeric Augustin for the reviews.

Refs #7936

62dfd79f8b from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21165#comment:8>

Django

unread,
Oct 5, 2013, 4:22:35 AM10/5/13
to django-...@googlegroups.com
#21165: regressiontests.syndication.tests.SyndicationFeedTest.test_feed_last_modified_time
fails on Windows with sqlite
-------------------------------------+------------------------------------
Reporter: manfre | Owner: nobody
Type: Bug | Status: closed
Component: contrib.syndication | Version: master

Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------

Comment (by marfire):

I'm seeing similar failures in Windows in
`utils_tests.test_dateformat.DateFormatTests`. Same issue?

{{{
======================================================================
FAIL: test_datetime_with_local_tzinfo
(utils_tests.test_dateformat.DateFormatTests)


----------------------------------------------------------------------
Traceback (most recent call last):

File "C:\Django\django\tests\utils_tests\test_dateformat.py", line 39,
in test_datetime_with_local_tzinfo
self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U'))),
dt.replace(tzinfo=None))
AssertionError: datetime.datetime(2009, 5, 16, 4, 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 "C:\Django\django\tests\utils_tests\test_dateformat.py", line 48,
in test_datetime_with_tzinfo
self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U'))),
dt.astimezone(ltz).replace(tzinfo=None))
AssertionError: datetime.datetime(2009, 5, 16, 4, 30, 30) !=
datetime.datetime(2009, 5, 16, 5, 30, 30)
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21165#comment:9>

Reply all
Reply to author
Forward
0 new messages