コード例 #1
0
def python2_only(test):
    """Decorator for any tests that will fail under Python 3."""
    return unittest.skipIf(sys.version_info[0] > 2, 'Python 2 only')(test)
コード例 #2
0
def python2_only(test):
    """Decorator for any tests that will fail under Python 3."""
    return unittest.skipIf(sys.version_info[0] > 2, 'Python 2 only')(test)
コード例 #3
0
def new_enough(test):
    return unittest.skipIf(not ALL_GOOD,
                           'Pylint requires Python 2.7/3.3 or newer')(test)
コード例 #4
0
def new_enough(test):
    return unittest.skipIf(not ALL_GOOD,
            'Pylint requires Python 2.7/3.3 or newer')(test)