On Fri, Apr 9, 2010 at 5:29 PM, Gabriel Hurley <[email protected]> wrote:
> Maybe it's an overly simplistic question, but: what makes the tests
> slow currently? It's not simply the volume of them. It's more than
> possible for Python to race through hundreds of tests per second under
> the right conditions.

Tests are slow largely because you have to load fixtures into the
database and roll them back for every test case. This is required to
guarantee a consistent initial state for each test. Speeding tests up
would be great, but a lot of work has already been done in this area
(e.g., tests are performed in a transaction that's rolled back in
teardown, if possible, since that's faster then dropping and reloading
each table) so I'm not sure how much low-hanging fruit is left. Keep
in mind that it's better to have slow tests that do the right thing
than fast ones that don't. Of course fast tests that do the right
thing would be ideal.

Mike

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