Trying to run the full test suite with the Oracle backend after updating to r9745 I'm seeing some errors. I was actually trying to run it with the transaction speedups from #8138, but backed off to bare trunk and individual tests when I started seeing unexpected errors. (The full suite takes about nine hours to run on this machine without #8138, so in testing aggregates on Oracle previously I limited the tests to the newly-added aggregation tests.) Anyway, the first test that fails is basic:
D:\u\kmt\django\trunk>svn info
Path: .
URL: http://code.djangoproject.com/svn/django/trunk
Repository Root: http://code.djangoproject.com/svn
Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37
Revision: 9745
Node Kind: directory
Schedule: normal
Last Changed Author: russellm
Last Changed Rev: 9745
Last Changed Date: 2009-01-15 07:44:45 -0500 (Thu, 15 Jan 2009)
D:\u\kmt\django\trunk>svn diff
D:\u\kmt\django\trunk>echo %pythonpath%
d:\u\kmt\django\trunk
D:\u\kmt\django\trunk>cd tests
D:\u\kmt\django\trunk\tests>\bin\Python2.5.2\python.exe runtests.py --settings=oracle --verbosity=1 basic
Importing model basic
Creating test database...
Creating test database...
Creating test user...
Creating table django_content_type
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_site
Creating table django_flatpage
Creating table django_redirect
Creating table django_session
Creating table django_comments
Creating table django_comment_flags
Creating table django_admin_log
Creating table basic_article
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for flatpages.FlatPage model
Installing index for redirects.Redirect model
Installing index for comments.Comment model
Installing index for comments.CommentFlag model
Installing index for admin.LogEntry model
F
======================================================================
FAIL: Doctest: modeltests.basic.models.__test__.API_TESTS
----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\u\kmt\django\trunk\django\test\_doctest.py", line 2180, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for modeltests.basic.models.__test__.API_TESTS
File "D:\u\kmt\django\trunk\tests\modeltests\basic\models.py", line unknown line number, in API_TESTS
----------------------------------------------------------------------
File "D:\u\kmt\django\trunk\tests\modeltests\basic\models.py", line ?, in modeltests.basic.models.__test__.API_TESTS
Failed example:
Article.objects.dates('pub_date', 'year')
Expected:
[datetime.datetime(2005, 1, 1, 0, 0)]
Got:
[datetime.date(2005, 1, 1)]
----------------------------------------------------------------------
File "D:\u\kmt\django\trunk\tests\modeltests\basic\models.py", line ?, in modeltests.basic.models.__test__.API_TESTS
Failed example:
Article.objects.dates('pub_date', 'month')
Expected:
[datetime.datetime(2005, 7, 1, 0, 0)]
Got:
[datetime.date(2005, 7, 1)]
----------------------------------------------------------------------
File "D:\u\kmt\django\trunk\tests\modeltests\basic\models.py", line ?, in modeltests.basic.models.__test__.API_TESTS
Failed example:
Article.objects.dates('pub_date', 'day')
Expected:
[datetime.datetime(2005, 7, 28, 0, 0), datetime.datetime(2005, 7, 29, 0, 0), datetime.datetime(2005, 7, 30, 0, 0), d
atetime.datetime(2005, 7, 31, 0, 0)]
Got:
[datetime.date(2005, 7, 28), datetime.date(2005, 7, 29), datetime.date(2005, 7, 30), datetime.date(2005, 7, 31)]
----------------------------------------------------------------------
File "D:\u\kmt\django\trunk\tests\modeltests\basic\models.py", line ?, in modeltests.basic.models.__test__.API_TESTS
Failed example:
Article.objects.dates('pub_date', 'day', order='ASC')
Expected:
[datetime.datetime(2005, 7, 28, 0, 0), datetime.datetime(2005, 7, 29, 0, 0), datetime.datetime(2005, 7, 30, 0, 0), d
atetime.datetime(2005, 7, 31, 0, 0)]
Got:
[datetime.date(2005, 7, 28), datetime.date(2005, 7, 29), datetime.date(2005, 7, 30), datetime.date(2005, 7, 31)]
----------------------------------------------------------------------
File "D:\u\kmt\django\trunk\tests\modeltests\basic\models.py", line ?, in modeltests.basic.models.__test__.API_TESTS
Failed example:
Article.objects.dates('pub_date', 'day', order='DESC')
Expected:
[datetime.datetime(2005, 7, 31, 0, 0), datetime.datetime(2005, 7, 30, 0, 0), datetime.datetime(2005, 7, 29, 0, 0), d
atetime.datetime(2005, 7, 28, 0, 0)]
Got:
[datetime.date(2005, 7, 31), datetime.date(2005, 7, 30), datetime.date(2005, 7, 29), datetime.date(2005, 7, 28)]
----------------------------------------------------------------------
File "D:\u\kmt\django\trunk\tests\modeltests\basic\models.py", line ?, in modeltests.basic.models.__test__.API_TESTS
Failed example:
for a in Article.objects.dates('pub_date', 'day', order='DESC').iterator():
print repr(a)
Expected:
datetime.datetime(2005, 7, 31, 0, 0)
datetime.datetime(2005, 7, 30, 0, 0)
datetime.datetime(2005, 7, 29, 0, 0)
datetime.datetime(2005, 7, 28, 0, 0)
Got:
datetime.date(2005, 7, 31)
datetime.date(2005, 7, 30)
datetime.date(2005, 7, 29)
datetime.date(2005, 7, 28)
----------------------------------------------------------------------
File "D:\u\kmt\django\trunk\tests\modeltests\basic\models.py", line ?, in modeltests.basic.models.__test__.API_TESTS
Failed example:
Article.objects.get(pk=a.id).headline
Expected:
u'\u6797\u539f \u3081\u3050\u307f'
Got:
u'\xbf\xbf \xbf\xbf\xbf'
----------------------------------------------------------------------
Ran 1 test in 1.652s
FAILED (failures=1)
Destroying test database...
Destroying test user...
Destroying test database tables...
D:\u\kmt\django\trunk\tests>
That last error with headline is something I see all the time and haven't tracked down. It's the datetime.date
s coming back instead of datetime.datetime
s that are new with the aggregation checkin.
I'll continue checking the individual tests where I'm seeing errors and update here if I see others that look like different issues.
It's because of these heuristics:
http://code.djangoproject.com/browser/django/trunk/django/db/backends/oracle/query.py#L94
See the note a few lines above:
http://code.djangoproject.com/browser/django/trunk/django/db/backends/oracle/query.py#L73
during the aggregation merge the
test at http://code.djangoproject.com/browser/django/trunk/django/db/backends/oracle/query.py?rev=9741#L89 got lost and that's why it started to fail after that.
Adding a
test before should solve the problem.