[pony-build] in-memory db stuff

C. Titus Brown ctb at msu.edu
Tue Mar 30 07:25:12 PDT 2010


On Mon, Mar 29, 2010 at 07:37:35PM -0400, Max Laite wrote:
> Hmmm well, seems that doing a test in run.py to see if a dbfile was
> specified or not and passing that or :memory: may work?

Yep.

> Seems too easy to be true.....I have it hard coded right now to just use
> :memory: and it seems to be working. I see no files created like when we use
> something.db.
> 
> How would we go about testing it?

Good question!

> It doesn't change any output or create any output, you just pass :memory:
> and that is it, sqlite takes care of everything in the back ground.
> 
> Would it be possible to do something where we create in-memory db, then do a
> memory purge then see if its gone or not? Not sure it can be easily tested.

Probably the best way is to add some data into the db, then tell the
current db to reopen itself (at which point all the data will be gone) and test
to make sure we have an empty db.

cheers,
--titus



More information about the pony-build mailing list