Hi all,

I've submitted a ticket 1763
(http://code.djangoproject.com/ticket/1763) which has a script to
enable the teardown/setup of a SQLite in-memory database for use with
unit tests.

The script is based on the one from Ian Maurer :

http://itmaurer.com/blog/?p=2

I've also included a patch which changes the way that
django.db.connection is referenced in the Django code as the current
idiom of :

from django.db import connection

causes problems with replacing the db backend.  In a nutshell, you have to use

import django.db

or else you'll get the a reference to the connection attribute in all
the calling modules.  That won't work if you want to replace the db
module at runtime (like when you're unit testing).

I think the script and patch has a lot of value since it makes unit
testing Django apps much easier as you no longer have to sit there
waiting on disk i/o when your tests run.  Changes like the MR merge to
trunk are manageable for me - i just run my test suite with the
in-memory database and see what fails, fix my failures and move on.

I've never submitted code to Django before - what can I do to help
make this patch go in to the trunk?  I've run the Django testsuite
with all passes, but I'm not sure if I should do anything else.

thanks,
vic

--
"Never attribute to malice that which can be adequately explained by
stupidity."  - Hanlon's Razor

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to