I'm a bit plagued by slow running tests as well, but i'm using an acceptable workaround (for my uses). This workaround assumes that you run your tests per app and that you only need to test a newly created test case.
The idea is to use your keyboard interrupt to stop the test suite after your newly created test case fails (or succeeds). However, using your keyboard interrupt will produce the stack trace of the test suite, not the current test it is working on. A small change to your test class can change this though. I've added this to djangosnippets.org, but it seems to be down at the moment. Add this method to your unit test class: def __call__(self, result=None): try: super(YourTestClass, self).__call__(result) except KeyboardInterrupt: result.stop() Test cases are run alphabetically, so to have a newly created test case run first, just make it come first alphabetically. Django uses the 'cmp' function internally. Personally i'm using a naming scheme like test_99_foo, test_98_foo2, ... Ofcourse, as i said, this workaround is no use if you need to run every test case every time you run your tests. regards, Simon On Jul 17, 9:16 am, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > This is because Django's test case flushes the database between each > > test. This is the right thing to do for testing purposes, because it > > removes the possibility of crossover effects in the testing process, > > but it does impose a slowdown (because flushing is an expensive > > operation). > > I have a question here. I have found Django to be much faster than, > say, Rails. However, Django seems to take way more time to load > fixtures (I am not counting the time taken to create the database > each time here) compared to Rails. > > Do you have any thoughts on why this is so? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---