def contains_exact_files(directory, expected_files, ignore_links=False):
 return (sorted(expected_files) == sorted(exact_files(directory, ignore_links=ignore_links)))

def contains_exact_files ( directory , expected_files , ignore_links = False ) : return ( sorted ( expected_files ) == sorted ( exact_files ( directory , ignore_links = ignore_links ) ) )
check if the only files which directory contains are expected_files .