|
4 | 4 | import os
|
5 | 5 |
|
6 | 6 | from colorama import Fore
|
| 7 | + |
| 8 | +from atcodertools.tools.tester import USER_FACING_JUDGE_TYPE_LIST, DEFAULT_EPS |
7 | 9 | from atcodertools.tools.utils import with_color
|
8 | 10 |
|
9 | 11 | from atcodertools.client.atcoder import AtCoderClient, LoginError
|
@@ -52,6 +54,19 @@ def main(prog, args, credential_supplier=None, use_local_session_cache=True) ->
|
52 | 54 | " the safety by this option in order to submit codes twice or more.",
|
53 | 55 | default=False)
|
54 | 56 |
|
| 57 | + parser.add_argument('--judge-type', '-j', |
| 58 | + help='error type' |
| 59 | + ' must be one of [{}]'.format( |
| 60 | + ', '.join(USER_FACING_JUDGE_TYPE_LIST)), |
| 61 | + type=str, |
| 62 | + default=None) |
| 63 | + |
| 64 | + parser.add_argument('--error-value', '-v', |
| 65 | + help='error value for decimal number judge:' |
| 66 | + ' [Default] ' + str(DEFAULT_EPS), |
| 67 | + type=float, |
| 68 | + default=None) |
| 69 | + |
55 | 70 | args = parser.parse_args(args)
|
56 | 71 |
|
57 | 72 | metadata_file = os.path.join(args.dir, "metadata.json")
|
@@ -79,6 +94,10 @@ def main(prog, args, credential_supplier=None, use_local_session_cache=True) ->
|
79 | 94 | tester_args += ["-d", args.dir]
|
80 | 95 | if args.timeout:
|
81 | 96 | tester_args += ["-t", str(args.timeout)]
|
| 97 | + if args.judge_type is not None: |
| 98 | + tester_args += ["-j", str(args.judge_type)] |
| 99 | + if args.error_value is not None: |
| 100 | + tester_args += ["-v", str(args.error_value)] |
82 | 101 |
|
83 | 102 | if args.force or tester.main("", tester_args):
|
84 | 103 | submissions = client.download_submission_list(metadata.problem.contest)
|
|
0 commit comments