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 hpk, michael.foord, r.david.murray
Date 2010-12-08.10:26:16
SpamBayes Score 1.8074431e-13
Marked as misclassified No
Message-id <1291803981.93.0.578773236564.issue10548@psf.upfronthosting.co.za>
In-reply-to
Content
Well, the original report is here:

http://code.google.com/p/unittest-ext/issues/detail?id=21

I copied all the details provided into this issue though. Obviously the original reporter feels that they have a genuine use case.

There is also issue 9857 where Antoine is asking for test skipping in a tearDown. His use case works just as well for wanting to mark an expected fail in a tearDown (or a clean up function). As soon as we allow skips in tearDown / cleanUp functions it seems wise to also allow them in setUps for consistency (otherwise it becomes difficult to remember which parts of the test can skip, which can be expected fail etc):

http://bugs.python.org/issue9857

Raising SkipTest when in a tearDown method is reported as an error, rather than a skipped test.
Now doing this sounds like a weird use case, but it would be actually useful when you have a worker thread, and the tearDown method collects the exception raised in that thread and raises it again. For the worker thread to be able to use skipTest(), a SkipTest exception raised in tearDown should be properly reported as a skip.
History
Date User Action Args
2010-12-08 10:26:21michael.foordsetrecipients: + michael.foord, r.david.murray, hpk
2010-12-08 10:26:21michael.foordsetmessageid: <1291803981.93.0.578773236564.issue10548@psf.upfronthosting.co.za>
2010-12-08 10:26:16michael.foordlinkissue10548 messages
2010-12-08 10:26:16michael.foordcreate