Skip to content

Commit d1b5aa0

Browse files
committed
fix tests
1 parent 621bc5a commit d1b5aa0

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

plagcheck/plagcheck_test.py

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,27 @@
11
"""Tests for the MOSS interface package for CodeClassroom"""
2-
from plagcheck import plagcheck
3-
from plagcheck import analyze
2+
from plagcheck import analyze, plagcheck
43

54

65
def test_check():
76
"""General test"""
87
language = "python"
98
userid = "1"
109
temp = plagcheck.check(language, userid)
11-
temp.addFilesByWildCard("testfiles/test_python*.py")
10+
temp.addFile("testfiles/test_python.py")
11+
temp.addFile("testfiles/test_python2.py")
1212
temp.submit()
1313
results = temp.getResults()
1414
insights = temp.getInsights()
1515
share_scores = temp.getShareScores()
1616

1717
assert share_scores == {
18-
"testfiles/test_python.py": 2,
19-
"testfiles/test_python2.py": 2,
20-
"testfiles/test_python3.py": 2,
18+
"testfiles/test_python.py": 1,
19+
"testfiles/test_python2.py": 1,
2120
}
2221

2322
assert insights == {"DCtoC Paths": [], "DtoC Paths": [], "DtoDC Paths": []}
2423

2524
assert results == [
26-
{
27-
"file1": "testfiles/test_python2.py",
28-
"file2": "testfiles/test_python3.py",
29-
"lines_matched": [["1-3", "1-3"]],
30-
"no_of_lines_matched": 3,
31-
"percentage_file1": 90,
32-
"percentage_file2": 90,
33-
},
34-
{
35-
"file1": "testfiles/test_python.py",
36-
"file2": "testfiles/test_python3.py",
37-
"lines_matched": [["1-3", "1-3"]],
38-
"no_of_lines_matched": 3,
39-
"percentage_file1": 90,
40-
"percentage_file2": 90,
41-
},
4225
{
4326
"file1": "testfiles/test_python.py",
4427
"file2": "testfiles/test_python2.py",

0 commit comments

Comments
 (0)