New submission from Serhiy Storchaka:

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")
        ...

----------
components: Tests
files: skip_tests.patch
keywords: patch
messages: 194790
nosy: ezio.melotti, michael.foord, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Report skipped tests as skipped
type: enhancement
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31213/skip_tests.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18702>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to