<s> import sys <EOL> import os <EOL> import glob <EOL> import unittest <EOL> os . chdir ( os . path . split ( os . path . abspath ( __file__ ) ) [ <NUM_LIT:0> ] ) <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( os . curdir ) ) <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( os . pardir ) ) <EOL> def buildTestSuite ( ) : <EOL> suite = unittest . TestSuite ( ) <EOL> for testcase in glob . glob ( '<STR_LIT>' ) : <EOL> module = os . path . splitext ( testcase ) [ <NUM_LIT:0> ] <EOL> suite . addTest ( __import__ ( module ) . buildTestSuite ( ) ) <EOL> return suite <EOL> def main ( ) : <EOL> results = unittest . TextTestRunner ( ) . run ( buildTestSuite ( ) ) <EOL> return results <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> results = main ( ) <EOL> if not results . wasSuccessful ( ) : <EOL> sys . exit ( <NUM_LIT:1> ) </s>
