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 rbcollins
Recipients hpk, michael.foord, ncoghlan, r.david.murray, rbcollins
Date 2014-10-23.08:47:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414054039.07.0.0956849355432.issue10548@psf.upfronthosting.co.za>
In-reply-to
Content
I'd argue for 
 - An error - its not covered by the decorator.
 - An error - the last two are not covered by the decorator.
 - An error - the last two are not covered by the decorator.
 - An error - the exception isn't a 'failure' [today - we should revisit this but its a separate issue to the code coverage aspect and the last two aren't covered by the decorator.

Perhaps I'm infected by knowing too much about the plumbing, but we can make things *super* complex (both implementation and reasoning-about-for-users) if we are too clever - and making the decorator affect multiple different methods is very much across that line IMO.

"If the test itself fails as expected, then I'm OK with cleanup code also failing as a consequence."

I'm not unless we've got a really specific reason to be OK with it - in my experience that will mask nasty things like leaked temp files which can have bad consequences - and because its masked its then hard for developers to diagnose. So its bad all around.

"However, I'd also be OK with the simpler model that treats the decorator as covering the whole setUp/test/cleanUp/tearDown cycle, in which case an exception from *any* of those methods would be categorised as satisfying the "expected failure" decorator."

So - I think a simpler still model which is that the decorator covers the decorated code is better still, as it doesn't need any explanation about how its different to regular python decorators.
History
Date User Action Args
2014-10-23 08:47:19rbcollinssetrecipients: + rbcollins, ncoghlan, r.david.murray, michael.foord, hpk
2014-10-23 08:47:19rbcollinssetmessageid: <1414054039.07.0.0956849355432.issue10548@psf.upfronthosting.co.za>
2014-10-23 08:47:19rbcollinslinkissue10548 messages
2014-10-23 08:47:18rbcollinscreate