(argv)
| 57 | |
| 58 | |
| 59 | def 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 | |
| 80 | if __name__ == '__main__': |
no test coverage detected