Python testtools.skipUnless() Examples

The following are 2 code examples of testtools.skipUnless(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module testtools , or try the search function .
Example #1
Source File: helpers.py    From tacker with Apache License 2.0 5 votes vote down vote up
def requires_py2(testcase):
    return testtools.skipUnless(six.PY2, "requires python 2.x")(testcase) 
Example #2
Source File: helpers.py    From tacker with Apache License 2.0 5 votes vote down vote up
def requires_py3(testcase):
    return testtools.skipUnless(six.PY3, "requires python 3.x")(testcase)