def test_main(args):
""" """
parser = argparse.ArgumentParser(description=description())
parser.add_argument('-f',
'--image_file',
default='../examples/GodRoss.jpg',
type=str,
help='The file path of the image to test')
parser.add_argument('test_name',
type=str,
help='The name of the test to perform')
args = parser.parse_args(args)
try:
if args.test_name == "test_many_random":
test_many_random(args.image_file, 5, 5)
elif args.test_name == "test_multi_origin":
test_multi_origin(args.image_file, 4)
else: print("Error: Test function {} doesn't exist".format(args.test_name),
file=sys.stderr)
except OSError:
print("Error: File: {} doesn't exist".format(args.image_file),
file=sys.stderr)
评论列表
文章目录