def test_format_pep8():
 pep8_checker = StyleGuide()
 files_to_check = []
 for path in list_files('.py'):
  rel_path = os.path.relpath(path, pylearn2.__path__[0])
  if (rel_path in whitelist_pep8):
   continue
  else:
   files_to_check.append(path)
 report = pep8_checker.check_files(files_to_check)
 if (report.total_errors > 0):
  raise AssertionError('PEP8 Format not respected')

def test_format_pep8 ( ) : pep8_checker = StyleGuide ( ) files_to_check = [ ] for path in list_files ( '.py' ) : rel_path = os . path . relpath ( path , pylearn2 . __path__ [ 0 ] ) if ( rel_path in whitelist_pep8 ) : continue else : files_to_check . append ( path ) report = pep8_checker . check_files ( files_to_check ) if ( report . total_errors > 0 ) : raise AssertionError ( 'PEP8 Format not respected' )
test if pep8 is respected .