<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import os <EOL> import stat <EOL> def is_executable ( f ) : <EOL> executable = stat . S_IEXEC | stat . S_IXGRP | stat . S_IXOTH <EOL> st = os . stat ( f ) <EOL> mode = st . st_mode <EOL> return mode & executable <EOL> class Test ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> pass <EOL> def tearDown ( self ) : <EOL> pass <EOL> def test_tools_are_executable ( self ) : <EOL> my_dir = os . path . dirname ( __file__ ) <EOL> parent_dir = os . path . normpath ( os . path . join ( my_dir , '<STR_LIT:..>' , '<STR_LIT:..>' ) ) <EOL> tools_dir = os . path . join ( parent_dir , '<STR_LIT>' ) <EOL> self . assertTrue ( os . path . exists ( tools_dir ) , '<STR_LIT>' % tools_dir ) <EOL> tools = [ x for x in os . listdir ( tools_dir ) if x . endswith ( '<STR_LIT>' ) ] <EOL> for tool in tools : <EOL> toolpath = os . path . join ( tools_dir , tool ) <EOL> self . assertTrue ( os . path . exists ( toolpath ) , '<STR_LIT>' % tool ) <EOL> self . assertTrue ( os . path . isfile ( toolpath ) , '<STR_LIT>' % tool ) <EOL> self . assertTrue ( is_executable ( toolpath ) , '<STR_LIT>' % tool ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
