Hi, > I am trying to move my unit tests from using an sqlite file to using > sqlite in-memory. That's really possible. I do that myself.
> The first problem I have is in websetup.py After the db is created, I > insert some sample data, but the part that checks for and inserts > sample data says that the table is present. I suspect that the db is > created in one connection and the sample data is added in another, so > the in memory db is gone. That shouldn't be problem. That depends how you have organized everything. > Can anyone give any tips as to the best way to do my testing with an > sqlite in-memory db? Ideally with minimal changes to the existing way > that it works with production persistant dbs. Look at my "Pekla" project how everything is organized: http://hg.sandbox.lt/pekla Those files are most important as far as I remember: http://hg.sandbox.lt/pekla/file/012a56a06089/pekla/tests/__init__.py http://hg.sandbox.lt/pekla/file/012a56a06089/test.ini HTH. -- Dalius http://blog.sandbox.lt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
