Message230105
assertions in setUp are fine IMO. But here's the thing. WHat should this code do?
class Demo(unittest.TestCase):
def setUp(self):
raise Exception('hi')
def test_normal(self):
# this should NOT be covered by expectedFailure
pass
@unittest.expectedFailure
def test_expected_fail(self):
pass
This will fail today because the decorator doesn't affect setUp.
If we apply a patch to change this, it will fail because test_normal doesn't apply the decorator.
I can imagine with dependency injection that one could set this up and have it genuinely configured correctly: but if one is doing that I'd expect the dimension of variance to be per scenario, not per test method. So it still wouldn't make sense to me.
@nick - yes, thats exactly right, this is at most docs IMO. |
|
Date |
User |
Action |
Args |
2014-10-27 21:23:32 | rbcollins | set | recipients:
+ rbcollins, ncoghlan, r.david.murray, michael.foord, hpk |
2014-10-27 21:23:32 | rbcollins | set | messageid: <1414445012.89.0.0635827055823.issue10548@psf.upfronthosting.co.za> |
2014-10-27 21:23:32 | rbcollins | link | issue10548 messages |
2014-10-27 21:23:32 | rbcollins | create | |
|