Russell Keith-Magee wrote: > On 9/4/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: >> Partly on this topic: I would very much like to use sqlite in-memory >> databases for testing, even though I use MySQL for deployment. The speed >> difference is 10x. One way to do this is to have a TEST_DATABASE_ENGINE >> setting, and add logic to create_test_db(). >> >> Thoughts? >> > > If there were a TEST_DATABASE_ENGINE setting, it would imply that there were > analogs of all the other DATABASE_ settings, too. I can't say I'm crazy > about this idea. 'Deploy under MySQL, but test under PostgreSQL' isn't a > particularly compelling use case for me. IMHO, testing for one database but > deploying onto another sort of defeats the purpose of testing. > > However, when you are developing unit tests, having a fast turnaround on > test execution is certainly desirable; using SQLite in-memory is certainly > one way to get this fast turnaround. > > Rather than having TEST_DATABASE_ENGINE (which implies that ANY database > engine could be used), I would be inclined to have a TEST_IN_MEMORY setting, > which forces all tests to be run in SQLite, using an in memory database.
Just my 2c: In the beginning, I tried to use SQLite for my tests. I soon found that this would not work without major changes because of the various nasty differences between the SQL engines. Also, I need to be sure that everything works under MySQL, so I now even run the django test suite under MySQL. All in all, I don't find this option useful for me, though other's mileage may vary. Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers -~----------~----~----~----~------~----~------~--~---