def run_set1(path): """ Return tests results for .ttf font in parameter """ assert os.path.exists(path) return run_suite(make_suite(path, 'result'))
def run_set(path): """ Return tests results for .ttf font in parameter """ assert os.path.exists(path) return run_suite(make_suite(path, 'result')) if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('action', help="Action or target test suite", choices=['list', 'result', 'upstream', 'upstream-ttx'],) parser.add_argument('file', nargs="*", help="Test files, can be a list") parser.add_argument('--verbose', '-v', action='count', help="Verbosity level", default=1) args = parser.parse_args() if args.action == 'list': tests_report() sys.exit() if not args.file: print("Missing files to test") sys.exit(1) for x in args.file: print(x) s = make_suite(x, args.action) runner = unittest.TextTestRunner(verbosity=args.verbose) # run_suite(s) runner.run(s)