humann/tests/utils.py
def check_output(output_files_expected,output_folder=None):
    """ Check the output folder has the expected file and they are all non-zero """
    
    for file in output_files_expected:
        if output_folder:
            expected_file = os.path.join(output_folder,file)
        else:
            expected_file = file
        # check the file exists
        yield (os.path.isfile(os.path.join(expected_file)), "File does not exist: " + file)
        
        # check the file is not empty
        yield (os.stat(expected_file).st_size > 0, "File is empty: " + file)
 Check the output folder has the expected file and they are all non-zero 
Check the output folder has the expected file and they are all non-zero
Check the output folder has the expected file and they are all non - zero
def check_output(output_files_expected,output_folder=None):
    for file in output_files_expected:
        if output_folder:
            expected_file = os.path.join(output_folder,file)
        else:
            expected_file = file
        yield (os.path.isfile(os.path.join(expected_file)), "File does not exist: " + file)
        yield (os.stat(expected_file).st_size > 0, "File is empty: " + file)
def check_output ( output_files_expected , output_folder = None ) : for file in output_files_expected : if output_folder : expected_file = os . path . join ( output_folder , file ) else : expected_file = file yield ( os . path . isfile ( os . path . join ( expected_file ) ) , "File does not exist: " + file ) yield ( os . stat ( expected_file ) . st_size > 0 , "File is empty: " + file )
Check the output folder has the expected file and they are all non-zero
Check the output folder has the expected file and they are all non - zero
""" Check the output folder has the expected file and they are all non-zero """ # check the file exists # check the file is not empty
output_files_expected
output_folder