-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhw21.py
More file actions
36 lines (30 loc) · 1.54 KB
/
Copy pathhw21.py
File metadata and controls
36 lines (30 loc) · 1.54 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
import unittest
from GradingInterface import interface
import os
path = os.getcwd()
print(path)
class TestGradingInterface(unittest.TestCase):
def test_grade_submission(self):
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw17-21/hw21/hw21.zip'),
os.path.join(path, '2020homeworks/HW21Sudoku'))
print(graded.get_error_list())
print(graded.get_grade())
def test_grade_submission1(self):
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw17-21/hw21/hw21_compile_error.zip'),
os.path.join(path, '2020homeworks/HW21Sudoku'))
print(graded.get_error_list())
print(graded.get_grade())
'''
def test_grade_submission2(self):
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw17-21/hw21/hw21_memory_leak.zip'),
os.path.join(path, '2020homeworks/HW21Sudoku'))
print(graded.get_error_list())
print(graded.get_grade())
'''
def test_grade_submission3(self):
graded = interface.grade_submission(os.path.join(path, '2020homeworks/grade_testing/hw17-21/hw21/hw21_wrong_output.zip'),
os.path.join(path, '2020homeworks/HW21Sudoku'))
print(graded.get_error_list())
print(graded.get_grade())
if __name__ == '__main__':
unittest.main() # run the unit test again ...