def onlyif_cmds_exist(*commands):
 for cmd in commands:
  if (not which(cmd)):
   return skip("This test runs only if command '{0}' is installed".format(cmd))
 return null_deco

def onlyif_cmds_exist ( * commands ) : for cmd in commands : if ( not which ( cmd ) ) : return skip ( "This test runs only if command '{0}' is installed" . format ( cmd ) ) return null_deco
decorator to skip test when at least one of commands is not found .