I now have Django passing the test suite with the PostgreSQL backend,
on Python 2.7.2 and Python 3.2.2. The tests were run on Ubuntu Oneiric
64-bit in a VM.

Python 3:
Python 3.2.2 from the Ubuntu package repository.
psycopg2-2.4.2 from http://initd.org/psycopg/

Python 2:
Python 2.7.2 - Oneiric's system Python.
psycopg2-2.4.2 from the Ubuntu package repository.

Results:
Python 2.x:
Ran 4478 tests in 1265.949s
OK (skipped=69, expected failures=3)

Python 3.x:
Ran 4432 tests in 1268.253s
OK (skipped=75, expected failures=2, unexpected successes=1)

The 3.x test has fewer tests because PIL is not installed in that
environment. With PIL installed, the results are

Python 3.x:
Ran 4477 tests in 1383.850s
FAILED (failures=1, errors=1, skipped=71, expected failures=2,
unexpected successes=1)

The failure/error are caused by bugs in the PIL port on Python 3
(git://github.com/grahame/pil-py3k.git). It fails to recognise
valid .png files:

======================================================================
ERROR: test_multiple_calls
(regressiontests.file_storage.tests.InconsistentGetImageDimensionsBug)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vinay/projects/django3/tests/regressiontests/
file_storage/tests.py", line 538, in test_multiple_calls
    image_pil = Image.open(img_path)
  File "/home/vinay/.virtualenvs/py32/lib/python3.2/site-packages/PIL/
Image.py", line 1936, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file

======================================================================
FAIL: test_image_field (modeltests.model_forms.tests.OldFormForXTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vinay/projects/django3/tests/modeltests/model_forms/
tests.py", line 1253, in test_image_field
    self.assertEqual(f.is_valid(), True)
AssertionError: False != True

If anyone can reproduce these results, that would be great.

Additional data point: On earlier runs, I was experiencing really long
test run times. I found I was using the same database for 'default'
and 'other' in the configuration. I got some errors in the
multiple_database tests because of this, but had to be really patient,
because the tests in general ran so slowly. I got no warning about
this, just very poor performance. My working test_psycopg2.py settings
file is:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'djangotest',
        'USER': 'djangotest',
        'PASSWORD': 'djangotest',
        'HOST': 'eta-karmic',
    },
    'other': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'djangotest',
        'USER': 'djangotest',
        'PASSWORD': 'djangotest',
    }
}

Stupidly, I had left the 'HOST' line out of the above configuration,
causing both 'default' and 'other' to point to 'localhost'. Once this
was rectified, the test times seem a lot more reasonable. So it was
nothing to do with runtime overheads like calling u() etc.

So - with Ian Clelland's post[1] from a couple of days ago, we have
successful runs on 2.x and 3.x using a single codebase and SQLite,
PostgreSQL and MySQL backends. I suppose Oracle will be the next one
to focus on: Ian Kelly was getting 17 failures and 24 errors on 7
Dec[2], but some changes have been committed since then.

Is Oracle XE (Express Edition) a valid platform for Django's Oracle
tests? Does anyone here have experience installing it on Ubuntu 64-
bit? I have an Oracle forum post[3] which gives the installation
procedure, but it appears somewhat involved ...

Regards,

Vinay Sajip

[1] http://groups.google.com/group/django-developers/t/ad4e980c8cde49f
[2] http://groups.google.com/group/django-developers/msg/c113d3df5e836b7e
[3] https://forums.oracle.com/forums/thread.jspa/threadId=2301639

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to