Djangoists:

My last project got into trouble because the .json test fixtures took
so bloody long to run. (I fussed about that here at the time...)

So I started my current, blue-sky project with an absolutely clean new
codebase, and Django 1.2.3. I switched the test database to SQLite,
and wrote unit tests by creating each sample model object in the
setUp().

Tests took 1.25s to run.

When I dumped out that database as .json, and switched from using
setUp() to using fixtures, tests went to 1.45s.

This bodes ill for bigger data sets.

Is there some way to determine if the test runner is indeed using the
transaction-rollback trick? Where it creates the DB once, puts each
test case inside a transaction, and rolls the transaction back after
each run?

(Also, is there some way to log every SQL command sent to the DB?)

And even if the fixtures were re-creating the database before each
test case, shouldn't that work at the same speed as manual creation?
How on earth could it be slower??

--
  Phlip
  http://zeekland.zeroplayer.com/

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

Reply via email to