This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients gregory.p.smith, michael.foord
Date 2009-04-03.20:16:32
SpamBayes Score 0.00014584215
Marked as misclassified No
Message-id <1238789794.27.0.0904779058735.issue5679@psf.upfronthosting.co.za>
In-reply-to
Content
This is a nice (simple to use and understand) pattern for resource
allocation / deallocation.

Supporting the cleaning up of resources when setUp fails (without
duplicating clean up code) is just one use case. (I agree setUp failure
is unusual.)

It provides a clean way to clean up just the resources you have
allocated in the event of test failure, without having to keep track
yourself of how far the test has got. Manually tracking resource usage
is easy to get wrong.

bzr:

http://bazaar.launchpad.net/~jml/testtools/trunk/annotate/head%3A/testtools/testcase.py


And from zope.testing:

The documentation:
http://svn.zope.org/zope.testing/trunk/src/zope/testing/setupstack.txt?rev=92340&view=auto


The module:
http://svn.zope.org/zope.testing/trunk/src/zope/testing/setupstack.py?rev=92340&view=auto
History
Date User Action Args
2009-04-03 20:16:34michael.foordsetrecipients: + michael.foord, gregory.p.smith
2009-04-03 20:16:34michael.foordsetmessageid: <1238789794.27.0.0904779058735.issue5679@psf.upfronthosting.co.za>
2009-04-03 20:16:33michael.foordlinkissue5679 messages
2009-04-03 20:16:32michael.foordcreate