Repository navigation
Expand file tree
/
Copy pathtest2020hw.py
More file actions
68 lines (50 loc) · 2.42 KB
/
Copy pathtest2020hw.py
File metadata and controls
68 lines (50 loc) · 2.42 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import unittest
from GradingInterface import interface
import os
path = os.path.join(os.getcwd(), 'TestCases')
def testhw02():
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw1-8/sort.zip'),
os.path.join(path, '2020homeworks/HW02Sort'))
print(f'grade for hw02 is {graded.get_grade()}')
return graded.get_error_list()
def testhw03():
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw1-8/eliminate.zip'),
os.path.join(path, '2020homeworks/HW03Cake'))
print(f'grade for hw03 is {graded.get_grade()}')
return graded.get_error_list()
def testhw04():
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw1-8/filechar.zip'),
os.path.join(path, '2020homeworks/HW04File'))
print(f'grade for hw04 is {graded.get_grade()}')
return graded.get_error_list()
def testhw05():
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw1-8/fileint.zip'),
os.path.join(path, '2020homeworks/HW05Sum'))
print(f'grade for hw05 is {graded.get_grade()}')
return graded.get_error_list()
def testhw06():
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw1-8/filestr.zip'),
os.path.join(path, '2020homeworks/HW06Word'))
print(f'grade for hw06 is {graded.get_grade()}')
return graded.get_error_list()
def testhw07():
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw1-8/hw07.zip'),
os.path.join(path, '2020homeworks/HW07QSort'))
print(f'grade for hw07 is {graded.get_grade()}')
return graded.get_error_list()
def testhw08():
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw1-8/hw08.zip'),
os.path.join(path, '2020homeworks/HW08Struct'))
print(f'grade for hw08 is {graded.get_grade()}')
return graded.get_error_list()
# ...
if __name__ == '__main__':
print('Start Testing...')
print(testhw02())
print(testhw03())
print(testhw04())
print(testhw05())
print(testhw06())
print(testhw07())
print(testhw08())
# ......