entry.run_tests() entry.close() if __name__ == '__main__': if multiproc: pool = Pool(jobs * 2) else: pool = None if os.path.isdir(tests): tests = [ os.path.join(tests, x) for x in os.listdir(tests) if (x.endswith('.test') and (not '_py.test' in x or ( harness.python and not harness.verify))) ] if pool: pool.map(do_test, tests, 1) else: map(do_test, tests) else: entry = RegressFile(tests) entry.run_tests() entry.close() if pool: pool.close() pool.join() harness.exit()
self.fd.close() def do_test(path): entry = RegressFile(path) entry.run_tests() entry.close() if __name__ == '__main__': if multiproc: pool = Pool(jobs*2) else: pool = None if os.path.isdir(tests): tests = [os.path.join(tests, x) for x in os.listdir(tests) if x.endswith('.test')] if pool: pool.map(do_test, tests, 1) else: map(do_test, tests) else: entry = RegressFile(tests) entry.run_tests() entry.close() if pool: pool.close() pool.join() harness.exit()