[ckan-dev] test failures

Seb Bacon seb.bacon at gmail.com
Fri Feb 4 14:11:50 UTC 2011


I tend to agree, you won't be surprised to hear, but I actually don't
mind that much, as long as it works, the tests are readable, and the
suite passes quickly.  I've only been making a big deal of it cos I
want to make sure no-one thinks I'm mad :)

(May have failed at that already... ;)

Seb

On 4 February 2011 14:04, William Waites <ww at styx.org> wrote:
> * [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