CARVIEW |
Select Language
HTTP/2 200
server: nginx
content-type: text/html;charset=utf-8
cache-control: must-revalidate
expires: Fri, 01 Jan 1999 00:00:00 GMT
set-cookie: trac_form_token=7b5a35a4c1b7ba99f1857517; HttpOnly; Path=/; Secure
set-cookie: trac_session=32dbea067b883dd07a3f191c; expires=Tue, 21 Oct 2025 05:39:25 GMT; HttpOnly; Path=/; Secure
strict-transport-security: max-age=31536000; includeSubDomains; preload
permissions-policy: interest-cohort=()
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
accept-ranges: bytes
via: 1.1 varnish, 1.1 varnish
date: Wed, 23 Jul 2025 05:39:25 GMT
x-served-by: cache-fra-etou8220102-FRA, cache-bom-vanm7210047-BOM
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-timer: S1753249166.715879,VS0,VE274
vary: Accept-Encoding
DjangoOnWindows/TestSuiteFailures – Django
Back to Top
Django
The web framework for perfectionists with deadlines.
Issues
Test suite failures
As Django 1.0, the test suite is showing the following failure(s) when run under Windows (XP 32 bits) + official Python 2.5.2:
- Ticket #7570 when using the sqlite3 Django DB backend (official Python 2.5.2 Windows distribution which includes SQLite 3.3.4).
ticket #7570
This test (and other two similar tests) fails:
Bug #7087 -- dates with extra select columns >>> Item.objects.dates('created', 'day').extra(select={'a': 1}) [datetime.datetime(2007, 12, 19, 0, 0), datetime.datetime(2007, 12, 20, 0, 0)]
Error is:
====================================================================== FAIL: Doctest: regressiontests.queries.models.__test__.API_TESTS ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\ramiro\django-trunk\django\test\_doctest.py", line 2180, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for regressiontests.queries.models.__test__.API_TESTS File "C:\ramiro\django-trunk\tests\regressiontests\queries\models.py", line unknown line number, in API_TESTS ---------------------------------------------------------------------- File "C:\ramiro\django-trunk\tests\regressiontests\queries\models.py", line ?, in regressiontests.queries.models.__test__.API_TESTS Failed example: Item.objects.dates('created', 'day').extra(select={'a': 1}) Exception raised: Traceback (most recent call last): File "C:\ramiro\django-trunk\django\test\_doctest.py", line 1267, in __run compileflags, 1) in test.globs File "<doctest regressiontests.queries.models.__test__.API_TESTS[169]>", line 1, in <module> Item.objects.dates('created', 'day').extra(select={'a': 1}) File "c:\ramiro\django-trunk\django\db\models\query.py", line 129, in __repr__ return repr(list(self)) File "c:\ramiro\django-trunk\django\db\models\query.py", line 141, in __len__ self._result_cache.extend(list(self._iter)) File "c:\ramiro\django-trunk\django\db\models\sql\subqueries.py", line 351, in results_iter for rows in self.execute_sql(MULTI): File "c:\ramiro\django-trunk\django\db\models\sql\query.py", line 1607, in execute_sql cursor.execute(sql, params) File "c:\ramiro\django-trunk\django\db\backends\sqlite3\base.py", line 136, in execute return Database.Cursor.execute(self, query, params) OperationalError: ORDER BY terms must not be non-integer constants ---------------------------------------------------------------------- Ran 253 tests in 433.032s FAILED (failures=1)
The SQL being generated by Django is correct:
>>> Item.objects.dates('created', 'day').extra(select={'a': 1}).query.as_sql() ('SELECT DISTINCT (1) AS "a", django_date_trunc("day", "sqlite3_dates_item"."created") FROM "sqlite3_dates_item" ORDER BY 1 ASC', ())
The problem has been tracked down to a bug in SQLite in version older than 3.3.6.
Solution
See https://docs.djangoproject.com/en/dev/ref/databases/#id8
Last modified
17 years ago
Last modified on Nov 18, 2008, 7:29:48 AM
Note:
See TracWiki
for help on using the wiki.
Download in other formats:
Django Links
Learn More
Get Involved
Follow Us
- Hosting by In-kind donors
- Design by Threespot &
© 2005-2025 Django SoftwareFoundation unless otherwise noted. Django is a registered trademark of the Django Software Foundation.