def verify_parser(usage=''):
formatter = argparse.RawDescriptionHelpFormatter
parser = argparse.ArgumentParser(prog='tdda verify',
epilog=usage + VERIFY_HELP,
formatter_class=formatter)
parser.add_argument('-?', '--?', action='help',
help='same as -h or --help')
parser.add_argument('-a', '--all', action='store_true',
help='report all fields, even if there are '
'no failures')
parser.add_argument('-f', '--fields', action='store_true',
help='report only fields with failures')
parser.add_argument('-c', '--constraints', action='store_true',
help='report only individual constraints that fail')
parser.add_argument('-1', '--oneperline', action='store_true',
help='report each constraint failure on a '
'separate line')
parser.add_argument('-7', '--ascii', action='store_true',
help='report without using special characters')
parser.add_argument('-type_checking', action='store_true',
help='strict or sloppy')
parser.add_argument('-epsilon', nargs=1, help='epsilon fuzziness')
return parser
评论列表
文章目录