﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10439	Test suite side-effects cause dateformat tests to fail	Malcolm Tredinnick	Malcolm Tredinnick	"Running the full tests (as of r10008) shows a failure in the dateformat tests. Running various tests in isolation plus the dateformat test does not generate the failure. So this is some kind of test suite unintended side-effect. Seems to happen under every backend.

The failing test reports this
{{{
======================================================================
FAIL: Doctest: regressiontests.dateformat.tests
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/var/buildbot/slave/parts/ubuntu-8.04-python2.4-mysql5.0/django-trunk_ubuntu-8.04-python2.4-mysql5.0/
build/django/test/_doctest.py"", line 2180, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for regressiontests.dateformat.tests
  File ""/var/buildbot/slave/parts/ubuntu-8.04-python2.4-mysql5.0/django-trunk_ubuntu-8.04-python2.4-mysql5.0/
build/tests/regressiontests/dateformat/tests.py"", line 0, in tests

----------------------------------------------------------------------
File ""/var/buildbot/slave/parts/ubuntu-8.04-python2.4-mysql5.0/django-trunk_ubuntu-8.04-python2.4-mysql5.0/
build/tests/regressiontests/dateformat/tests.py"", line 26, in regressiontests.dateformat.tests
Failed example:
    no_tz or format(my_birthday, 'O') == '+0100'
Expected:
    True
Got:
    False
----------------------------------------------------------------------
File ""/var/buildbot/slave/parts/ubuntu-8.04-python2.4-mysql5.0/django-trunk_ubuntu-8.04-python2.4-mysql5.0/
build/tests/regressiontests/dateformat/tests.py"", line 30, in regressiontests.dateformat.tests
Failed example:
    no_tz or format(my_birthday, 'r') == 'Sun, 8 Jul 1979 22:00:00 +0100'
Expected:
    True
Got:
    False
----------------------------------------------------------------------
File ""/var/buildbot/slave/parts/ubuntu-8.04-python2.4-mysql5.0/django-trunk_ubuntu-8.04-python2.4-mysql5.0/
build/tests/regressiontests/dateformat/tests.py"", line 38, in regressiontests.dateformat.tests
Failed example:
    no_tz or format(my_birthday, 'T') == 'CET'
Expected:
    True
Got:
    False
----------------------------------------------------------------------
File ""/var/buildbot/slave/parts/ubuntu-8.04-python2.4-mysql5.0/django-trunk_ubuntu-8.04-python2.4-mysql5.0/
build/tests/regressiontests/dateformat/tests.py"", line 40, in regressiontests.dateformat.tests
Failed example:
    no_tz or format(my_birthday, 'U') == '300531600'
Expected:
    True
Got:
    False
----------------------------------------------------------------------
File ""/var/buildbot/slave/parts/ubuntu-8.04-python2.4-mysql5.0/django-trunk_ubuntu-8.04-python2.4-mysql5.0/
build/tests/regressiontests/dateformat/tests.py"", line 52, in regressiontests.dateformat.tests
Failed example:
    no_tz or format(my_birthday, 'Z') == '3600'
Expected:
    True
Got:
    False
----------------------------------------------------------------------
File ""/var/buildbot/slave/parts/ubuntu-8.04-python2.4-mysql5.0/django-trunk_ubuntu-8.04-python2.4-mysql5.0/
build/tests/regressiontests/dateformat/tests.py"", line 57, in regressiontests.dateformat.tests
Failed example:
    no_tz or format(summertime, 'O') == '+0200'
Expected:
    True
Got:
    False
----------------------------------------------------------------------
File ""/var/buildbot/slave/parts/ubuntu-8.04-python2.4-mysql5.0/django-trunk_ubuntu-8.04-python2.4-mysql5.0/
build/tests/regressiontests/dateformat/tests.py"", line 61, in regressiontests.dateformat.tests
Failed example:
    no_tz or format(wintertime, 'O') == '+0100'
Expected:
    True
Got:
    False
}}}

I snarfed that output from [http://buildbot.djangoproject.com/waterfall the buildbot], but I'm seeing the same results locally.

For anybody investigating this: the wintertime/summertime times are set up to cross a daylight savings boundary from 2005 in Copenhagen (we're very tricky when we write our tests for things like that). The results should be (and have been, until recently) independent of the timezone of the machine doing the testing."		closed	Uncategorized	dev		fixed			Accepted	1	0	0	0	0	0
