MCPcopy Create free account
hub / github.com/apache/thrift / main

Function main

test/features/string_limit.py:59–77  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

57
58
59def main(argv):
60 p = argparse.ArgumentParser()
61 add_common_args(p)
62 p.add_argument('--limit', type=int)
63 args = p.parse_args()
64 proto = init_protocol(args)
65 test_string(proto, 'a' * (args.limit - 1))
66 test_string(proto, 'a' * (args.limit - 1))
67 print('[OK]: limit - 1')
68 test_string(proto, 'a' * args.limit)
69 test_string(proto, 'a' * args.limit)
70 print('[OK]: just limit')
71 try:
72 test_string(proto, 'a' * (args.limit + 1))
73 except Exception:
74 print('[OK]: limit + 1')
75 else:
76 print('[ERROR]: limit + 1')
77 assert False
78
79
80if __name__ == '__main__':

Callers 1

string_limit.pyFile · 0.70

Calls 3

add_common_argsFunction · 0.90
init_protocolFunction · 0.90
test_stringFunction · 0.85

Tested by

no test coverage detected