#NEWLINE# def test_flake8( ) : #NEWLINE# #INDENT# 'Test source code for pyFlakes and PEP8 conformance' #NEWLINE# flake8style = flake8 . engine . StyleGuide ( max_line_length = 120 ) #NEWLINE# report = flake8style . options . report #NEWLINE# report . start ( ) #NEWLINE# this_dir = os . path . dirname ( os . path . abspath ( __file__ ) ) #NEWLINE# try : #NEWLINE# #INDENT# input_dir = flake8style . input_dir #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# input_dir = flake8style . _styleguide . input_dir #NEWLINE# #UNINDENT# input_dir ( os . path . join ( this_dir , '..' , 'catkin_tools' ) ) #NEWLINE# report . stop ( ) #NEWLINE# assert ( report . total_errors == 0 ) , "Found '{0}' code style errors (and warnings)." . format ( report . total_errors )