<s> import os <EOL> import sys <EOL> import doctest <EOL> import unittest <EOL> sys . path . append ( os . path . join ( os . path . dirname ( sys . argv [ <NUM_LIT:0> ] ) , '<STR_LIT:..>' , '<STR_LIT>' ) ) <EOL> import test_fnmatch <EOL> import test_functools <EOL> import test_glob <EOL> import test_scheduler <EOL> def main ( ) : <EOL> suite = unittest . TestSuite ( ) <EOL> prefix = os . path . join ( '<STR_LIT:..>' , '<STR_LIT>' ) <EOL> for root , dirs , files in os . walk ( prefix ) : <EOL> root = root [ len ( prefix + os . sep ) : ] . replace ( os . sep , '<STR_LIT:.>' ) <EOL> for file in files : <EOL> if file == '<STR_LIT>' : <EOL> module = root <EOL> elif file . endswith ( '<STR_LIT>' ) : <EOL> module = root + '<STR_LIT:.>' + file [ : - len ( '<STR_LIT>' ) ] <EOL> else : <EOL> continue <EOL> try : <EOL> test = doctest . DocTestSuite ( __import__ ( module , { } , { } , [ '<STR_LIT>' ] ) ) <EOL> except ValueError as e : <EOL> pass <EOL> except ImportError : <EOL> if module == '<STR_LIT>' : <EOL> continue <EOL> else : <EOL> suite . addTest ( test ) <EOL> suite . addTest ( test_fnmatch . suite ( ) ) <EOL> suite . addTest ( test_functools . suite ( ) ) <EOL> suite . addTest ( test_glob . suite ( ) ) <EOL> suite . addTest ( test_scheduler . suite ( ) ) <EOL> runner = unittest . TextTestRunner ( verbosity = <NUM_LIT:2> ) <EOL> runner . run ( suite ) <EOL> return <NUM_LIT:0> <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> sys . exit ( main ( ) ) </s>
