[ckan-dev] test failures
William Waites
ww at styx.org
Fri Feb 4 14:04:00 UTC 2011
* [2011-02-04 13:15:09 +0000] Seb Bacon <seb.bacon at gmail.com> écrit:
] Still, I would prefer that tests that need VDM and a sample User
] called init_db() explicitly, and tests that altered the database state
] called clean_db() explicitly. That's all my intention was with all
] this stuff; I don't care if it's implemented with tables drops or
] database drops or what.
I agree with this sentiment, but am not sure about an explicit
clean_db(). I'd implement like this:
def rebuild_db():
clean_db()
init_db()
and always call that from the setUp, it only incurs an extra
performance hit the first time it is run.
Further I don't think this should somehow happen automatically
after all there are portions of the code that don't touch the
database and their tests should know this and not bother
unnecessarily churning.
-w
--
William Waites <mailto:ww at styx.org>
http://eris.okfn.org/ww/ <sip:ww at styx.org>
F4B3 39BF E775 CF42 0BAB 3DF0 BE40 A6DF B06F FD45
More information about the ckan-dev
mailing list