2009/6/10 Wichert Akkerman <[email protected]>:
> In my opinion the whole standard test setup Pylons installs should be
> different :). Currently importing package.tests has side-effects such as
> invoking websetup, which is a bit nasty; importing should never have
> side-effects imho, and this one is particularly invasive.
I totally agree. I remember this was surprising to see websetup being
fired when I started to setup my tests.
How does SetupCommand('setup-app').run([config['__file__']]) works ? I
feel like it's a subprocess is being called, just as if you'd type
"paster setup-app test.ini" from your shell at the root of your
project. If it's the case, then it's useless for me as I'm defining a
test database in "test.ini" which is a SQLite *memory* database. So
calling websetup.py as a paster subprocess, will fill my database then
loose everything when the process dies. Back in Pylons, it's like
nothing happened. So having SetupCommand in "tests/__init__.py"
doesn't fit everyone's needs. NOTE: This is only a guess, I haven't
actually tested it yet.
Alex
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---