def find_files(args):
    '''
    Return list of spec files. `args` may be filenames which are passed right
    through, or directories in which case they are searched recursively for
    *._spec.py
    '''
    files_or_dirs = args or ['.']
    filenames = []
    for f in files_or_dirs:
        if path.isdir(f):
            filenames.extend(glob.glob(path.join(f, '**', '*_spec.py'), recursive=True))
        elif path.isfile(f):
            filenames.append(f)
        else:
            raise FileNotFoundError('could not spec file {}'.format(repr(f)))
    return filenames
def find_files ( args ) : files_or_dirs = args or [ '.' ] filenames = [ ] for f in files_or_dirs : if path . isdir ( f ) : filenames . extend ( glob . glob ( path . join ( f , '**' , '*_spec.py' ) , recursive = True ) ) elif path . isfile ( f ) : filenames . append ( f ) else : raise FileNotFoundError ( 'could not spec file {}' . format ( repr ( f ) ) ) return filenames
Return list of spec files. `args` may be filenames which are passed right
    through, or directories in which case they are searched recursively for
    *._spec.py