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-27.21:23:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414445012.89.0.0635827055823.issue10548@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-10-27 21:23:32rbcollinssetrecipients: + rbcollins, ncoghlan, r.david.murray, michael.foord, hpk
2014-10-27 21:23:32rbcollinssetmessageid: <1414445012.89.0.0635827055823.issue10548@psf.upfronthosting.co.za>
2014-10-27 21:23:32rbcollinslinkissue10548 messages
2014-10-27 21:23:32rbcollinscreate