<s> import unittest <EOL> import os . path <EOL> import os <EOL> import sys <EOL> sys . path . append ( "<STR_LIT:.>" ) <EOL> excludes = [ '<STR_LIT>' ] <EOL> def run_tests ( ) : <EOL> testfolder = os . path . abspath ( os . path . split ( __file__ ) [ <NUM_LIT:0> ] ) <EOL> sys . path . append ( testfolder ) <EOL> for root , dirs , files in os . walk ( testfolder ) : <EOL> test_modules = [ <EOL> file . replace ( '<STR_LIT>' , '<STR_LIT>' ) for file in files if <EOL> file . startswith ( '<STR_LIT>' ) and <EOL> file . endswith ( '<STR_LIT>' ) ] <EOL> test_modules = [ mod for mod in test_modules if mod . lower ( ) not in excludes ] <EOL> for mod in test_modules : <EOL> imported_mod = __import__ ( mod , globals ( ) , locals ( ) ) <EOL> globals ( ) . update ( imported_mod . __dict__ ) <EOL> unittest . main ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> run_tests ( ) </s>
