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 serhiy.storchaka
Recipients ezio.melotti, michael.foord, pitrou, serhiy.storchaka
Date 2013-08-10.11:09:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za>
In-reply-to
Content
Some tests in Python testsuite are silently skipped if requirements is not satisfied. The proposed patch adds explicit "skipUnless()" and "raise SkipTest()" so that these tests now reported as skipped.

I.e. the code like

    if not condition:
        def test_foo(self):
            ...

is replaced by

    @unittest.skipUnless(condition, "requires foo")
    def test_foo(self):
        ...

and the code like

    def test_foo(self):
        ...
        if not condition:
            return
        ...

is replaced by

    def test_foo(self):
        ...
        if not condition:
            raise unittest.SkipTest("requires foo")
        ...
History
Date User Action Args
2013-08-10 11:09:28serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, ezio.melotti, michael.foord
2013-08-10 11:09:26serhiy.storchakasetmessageid: <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za>
2013-08-10 11:09:26serhiy.storchakalinkissue18702 messages
2013-08-10 11:09:26serhiy.storchakacreate