Python源码示例:testtools.skipUnless()

示例1
def requires_py2(testcase):
    return testtools.skipUnless(six.PY2, "requires python 2.x")(testcase) 
示例2
def requires_py3(testcase):
    return testtools.skipUnless(six.PY3, "requires python 3.x")(testcase)