On 16:01 Mon 10 Jan     , Phlip wrote:
> If the tests recreate the database once per test case, then they will run
> too slow. Because databases are tuned to support transactions efficiently,
> declaring the tests inside a transaction, then rolling it back, efficiently
> tests the database at a usage profile similar to production usage.

This is a very important point, and I'd like to stress it. SQLite3, in
particular, behaves _very poorly_ unless you use explicit
transactions. In my testing and benchmarking, I've seen inserts take
_orders of magnitude_ longer to execute outside of an explicit
transaction, mostly due to disk activity (from reading and writing
journals, I imagine).

> 
> Each case then only needs to call our target method ("Foo()"), then query
> the database to see if the data arrived.
> 
> -- 
>   Phlip
>   http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces

Thanks for sharing, Phlip! I'm glad you've found some use for the
sqlite3 bindings. :)

- Jamis

-- 
Jamis Buck
jamis_buck / byu.edu
http://www.jamisbuck.org/jamis
------------------------------
"I am Victor of Borge. You will be assimil-nine-ed."