[Zope-dev] unittest best-practices with Zope.
Chris McDonough
chrism@zope.com
Fri, 24 Aug 2001 08:42:06 -0400
It's usually best to "cleanse" your environment after each test. PyUnit
makes sure that setup is called before each test and that tearDown is
called after each test, so this is usually not a big deal. If setUp
takes too long, you can try to "share" a test fixture between tests (not
tearing it down at the end), but it's usually bad form.. sometimes it
will turn out in these cases that it's not even actually a unit test
that you're doing, but a regression test.
Erik Enge wrote:
> Bonjour,
>
> I'm wondering, when testing big zope applications, with a lot of
> interdependencies (say, you need to create object A before creating
> B), and in the spirit of _unit_ tests, do one let all the tests run
> and then pull a serious tearDown at the end of the suite to
> delete/clean up? Or does on set up everything for each test?
>
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )
>
--
Chris McDonough Zope Corporation
http://www.zope.org http://www.zope.com
"Killing hundreds of birds with thousands of stones"