Sunday, November 25, 2012

Speeding up test database creation

Hi all,

I've been doing the test-driven Django tutorial at http://www.tdd-django-tutorial.com/

I'm partway through the tutorial, and when I run the command "python manage.py test fts", the message "Creating test database for alias 'default'..." gets shown for 4-5 seconds before anything else happens.  This seems like a pretty long wait that will add up, especially if I'm going to be running my tests constantly as the tutorial suggests.  I've searched on Google some for how to speed this up, and people say that if sqlite is my database backend and I'm running tests, the database will be stored in RAM.  This appears to be the case already--the tutorial uses sqlite for the database backend.

So, am I missing something here?  And if not, is there some clever technique I can use to speed up or bypass the test database creation?  (I really have no idea what it's creating, to be honest... there's nothing to my app yet, but it still takes 4-5 seconds to create a test database?)

Thanks in advance for any help!

John

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/CYU4rpccsFcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment