def find_failing_tests(result_images, source):
 entries = []
 for (root, dirs, files) in os.walk(result_images):
  for fname in files:
   (basename, ext) = os.path.splitext(fname)
   if basename.endswith(u'-failed-diff'):
    path = os.path.join(root, fname)
    entry = Entry(path, result_images, source)
    entries.append(entry)
 entries.sort(key=(lambda x: x.name))
 return entries

def find_failing_tests ( result_images , source ) : entries = [ ] for ( root , dirs , files ) in os . walk ( result_images ) : for fname in files : ( basename , ext ) = os . path . splitext ( fname ) if basename . endswith ( u'-failed-diff' ) : path = os . path . join ( root , fname ) entry = Entry ( path , result_images , source ) entries . append ( entry ) entries . sort ( key = ( lambda x : x . name ) ) return entries
find all of the failing tests by looking for files with -failed-diff at the end of the basename .