Hi Chris,

A few things...

Is it possible you have some lingering ORM objects between tests and
that is what you think is rows persisting between sessions?  I've had
some issues around keeping ORM object references around that have
messed me up before.

Also, for what it's worth, in my unit tests I repeatedly create and
destroy zillions of parallel/complete sqlite databases between unit
tests and have zero issues.  I use an sqlite file instead of memory to
do this, and I just delete the whole file in each and every setUp.  To
avoid the comparatively extreme slowness involved with hard drive disk
access, I set up a quick ramdisk (tmpfs, actually... almost the same
thing) to keep it blazing fast.  It also lets your peruse your
generated databases while debugging with an sqlite manager, which is
impossible with a :memory: database (I think).

If using linux, you can mount a quick 100 MB ramdisk with this
command, assuming your system supports tmpfs:

mount tmpfs /path/to/ramdisk/dir/ -t tmpfs -o size=100m

Generate your sqlite file in /path/to/ramdisk/dir/ and you
get :memory: performance in a genuine file.  This has been extremely
useful for my debug process.

Russ

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en.

Reply via email to