Message 85324 - Python tracker (original) (raw)

Message85324

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:34 michael.foord set recipients: + michael.foord, gregory.p.smith
2009-04-03 20:16:34 michael.foord set messageid: 1238789794.27.0.0904779058735.issue5679@psf.upfronthosting.co.za
2009-04-03 20:16:33 michael.foord link issue5679 messages
2009-04-03 20:16:32 michael.foord create

Supported by The Python Software Foundation,
Powered by Roundup

Copyright © 1990-2022, Python Software Foundation
Legal Statements