I test with some mock SQLite databases and simply throw them away
after testing runs -- it's a much faster setup than building setup
data in setup() methods.

Right now I use a shell script to unzip the mock DB's before the test
run, run the test suite (using nose with a --with-pylons that
references the app test setup), and then delete the dirty test
databases and replace them with the "interactive testing" databases
when the test suite is done. It works, but it's a bit annoying because
the shell script is path-sensitive and it's also too inflexible to run
nosetests with different options

So I'd like to instead script this db setup in Python as a test setup
fixture, but it seems that my web app is already loaded by the time
that the provided websetup.py fixture is initialized. By that time, my
databases are also already in use, because I connect to them at webapp
startup time in my app_globals.Globals__init__().

Is there some way to run setup code before the application
Globals.__init__() is called?

Thanks,
Rick

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

Reply via email to