Example #1
0
def requires(*things):
    '''skip test case unless there is thing in ROLES'''
    try:
        for thing in things:
            locate_ns_item(ROLES, thing)
    except KeyError:
        return unittest.skip("no %r found in ROLES" % thing)
    return lambda function: function
Example #2
0
def requires(*things):
    '''skip test case unless there is thing in ROLES'''
    try:
        for thing in things:
            locate_ns_item(ROLES, thing)
    except KeyError:
        return unittest.skip("no %r found in ROLES" % thing)
    return lambda function: function
Example #3
0
 def wrapped():
     '''create propper decorator --- either skipping one or "empty" one'''
     if not any(map(condition, locate_ns_item(ROLES, thing))):
         return unittest.skip("no suitable items found in ROLES.%s" % thing)
     return lambda function: function
Example #4
0
 def wrapped():
     '''create propper decorator --- either skipping one or "empty" one'''
     if not any(map(condition, locate_ns_item(ROLES, thing))):
         return unittest.skip("no suitable items found in ROLES.%s" % thing)
     return lambda function: function