def main():
failurestrings = []<EOL>for test in glob.glob('<STR_LIT>'):<EOL><INDENT>sys.stderr.write('<STR_LIT>'.format(test))<EOL>test = os.path.splitext(test)[<NUM_LIT:0>]<EOL>suite = unittest.TestLoader().loadTestsFromName(test)<EOL>result = unittest.TestResult()<EOL>suite.run(result)<EOL>if result.wasSuccessful():<EOL><INDENT>sys.stderr.write('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>sys.stderr.write('<STR_LIT>')<EOL>for (testcase, failstring) in result.failures + result.errors:<EOL><INDENT>failurestrings.append(failstring)<EOL><DEDENT><DEDENT><DEDENT>if not failurestrings:<EOL><INDENT>sys.stderr.write('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>sys.stderr.write('<STR_LIT>')<EOL>for fstring in failurestrings:<EOL><INDENT>sys.stderr.write('<STR_LIT>'.format(fstring))<EOL><DEDENT><DEDENT>
Runs the tests.