-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests.py
44 lines (33 loc) · 1.13 KB
/
run_tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import argparse
from lib.google_sheet import COMMON_192_2_URL
from lib.run_all import run_all
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--manual-tests-dir', '-m', default='./manual_tests')
parser.add_argument('--google-sheet-url', '-g', default=COMMON_192_2_URL)
parser.add_argument('--contest', '-c', required=True)
parser.add_argument('--problem', '-p', required=True)
parser.add_argument('--target', '-t', default='./main.py')
parser.add_argument('--time-limit', '-l', type=float, default=2.0)
return parser.parse_args()
def main():
args = parse_args()
run_all(
target=args.target,
manual_tests_dir=args.manual_tests_dir,
google_sheet_url=args.google_sheet_url,
contest=args.contest,
problem=args.problem,
time_limit=args.time_limit
)
def main2():
run_all(
target='...your program',
manual_tests_dir='./manual_tests',
google_sheet_url=COMMON_192_2_URL,
contest='...contest name',
problem='...problem name',
time_limit=2.0
)
if __name__ == '__main__':
main()