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.

作者 rbcollins
收信人 hpk, michael.foord, ncoghlan, r.david.murray, rbcollins
日期 2014-10-27.21:23:32
SpamBayes Score -1.0
Marked as misclassified
Message-id <1414445012.89.0.0635827055823.issue10548@psf.upfronthosting.co.za>
In-reply-to
内容
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.
历史
日期 用户 动作 参数
2014-10-27 21:23:32rbcollins修改recipients: + rbcollins, ncoghlan, r.david.murray, michael.foord, hpk
2014-10-27 21:23:32rbcollins修改messageid: <1414445012.89.0.0635827055823.issue10548@psf.upfronthosting.co.za>
2014-10-27 21:23:32rbcollins链接issue10548 messages
2014-10-27 21:23:32rbcollins创建