Message229863
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. |
|
Date |
User |
Action |
Args |
2014-10-23 08:47:19 | rbcollins | set | recipients:
+ rbcollins, ncoghlan, r.david.murray, michael.foord, hpk |
2014-10-23 08:47:19 | rbcollins | set | messageid: <1414054039.07.0.0956849355432.issue10548@psf.upfronthosting.co.za> |
2014-10-23 08:47:19 | rbcollins | link | issue10548 messages |
2014-10-23 08:47:18 | rbcollins | create | |
|