-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Paper test and fixed Paper bug
- Loading branch information
Showing
2 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import pytest | ||
from prompt_systematic_review.paperSource import Paper | ||
from datetime import date | ||
|
||
def test_paper(): | ||
paper1 = Paper("How to write a paper", "Harry Parnasus", "example.com", date(2000,2,2), ["keyword1", "keyword2"]) | ||
paper2 = Paper("How to NOT write a paper", "John Dickenson", "example.com", date(2002,3,3), ["keyword1", "keyword2"]) | ||
alsoPaper1 = Paper("How to write a paper", "Dr. Harry Parnasus", "https://example2.com", date(2000,2,5), ["keyword1", "keyword2"]) | ||
|
||
assert paper1 == alsoPaper1 | ||
assert paper1 != paper2 and paper2 != alsoPaper1 |