Skip to content

Commit a55b084

Browse files
sbelskwilliamjallenbmcutler
authored
[Testing:Plagiarism] Add integration tests (#47)
* Progress * Progress * Fix input files * Add integration tests to CI * Finish it off * Update ignored files * Fix paths after merging master in * Add print commands to figure out why this doesn't work on github actions * Fix issue * Make requested changes to integration/test.py * Finish requested changes Co-authored-by: williamjallen <[email protected]> Co-authored-by: Barb Cutler <[email protected]>
1 parent 8ee1af9 commit a55b084

File tree

28 files changed

+2018
-290
lines changed

28 files changed

+2018
-290
lines changed

.flake8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ exclude=
55

66
per-file-ignores =
77
tokenizer/mips/mips_tokenizer.py:W605
8-
tests/tests.py:E501
8+
tests/unittest/tests.py:E501
9+
tests/integration/test.py:E501

.github/workflows/lichen_run.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ jobs:
1313
- name: Install Lichen
1414
run: |
1515
sudo bash ./tests/setup.sh
16-
- name: Run Tests
16+
- name: Run Unit Tests
1717
run: |
18-
cd /usr/local/submitty/GIT_CHECKOUT/Lichen/tests
18+
cd /usr/local/submitty/GIT_CHECKOUT/Lichen/tests/unittest
19+
sudo python3 -m unittest discover
20+
- name: Run Integration Tests
21+
run: |
22+
cd /usr/local/submitty/GIT_CHECKOUT/Lichen/tests/integration
1923
sudo python3 -m unittest discover

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*~
22
tools/assignments/*
3+
__pycache__
34
tests/__pycache__
45
vendor/
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"semester": "f21",
3+
"course": "plagiarism",
4+
"gradeable": "repeated_sequences",
5+
"config_id": "1",
6+
"version": "all_versions",
7+
"regex": "",
8+
"regex_dirs": [
9+
"submissions"
10+
],
11+
"language": "plaintext",
12+
"threshold": 5,
13+
"sequence_length": 4,
14+
"prior_term_gradeables": [],
15+
"ignore_submissions": []
16+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Beginning Lichen run: 2021-08-02 14:49:43
2+
CONCATENATE ALL...done in 0 seconds
3+
TOKENIZE ALL...done in 0 seconds
4+
HASH ALL...done in 0 seconds
5+
COMPARE HASHES...finished loading in 0 seconds
6+
hash walk: 50% complete
7+
hash walk: 100% complete
8+
finished walking in 0 seconds
9+
writing matches files and merging regions...
10+
merging: 50% complete
11+
merging: 100% complete
12+
done merging and writing matches files in 0 seconds
13+
writing rankings files...
14+
finished writing rankings in 0 seconds
15+
COMPARE HASHES done in 0 seconds

tests/data/test_lichen/repeated_sequences/expected_output/other_gradeables/git_placeholder.txt

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
25.71% bitdiddle 1
2+
19.48% aphacker 1

tests/data/test_lichen/repeated_sequences/expected_output/provided_code/files/git_placeholder.txt

Whitespace-only changes.

tests/data/test_lichen/repeated_sequences/expected_output/provided_code/hashes.txt

Whitespace-only changes.

tests/data/test_lichen/repeated_sequences/expected_output/provided_code/submission.concatenated

Whitespace-only changes.

0 commit comments

Comments
 (0)