Skip to content

Commit df490b5

Browse files
committed
Add tests for fetch_semanticscholar
1 parent 2f61f0a commit df490b5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
from litstudy.sources.semanticscholar import search_semanticscholar
1+
from litstudy.sources.semanticscholar import search_semanticscholar, fetch_semanticscholar
22

33

44
def test_load_s2_file():
55
search_semanticscholar('exascale', limit=10)
66
# assert 1==2
7+
8+
def test_fetch_semanticscholar():
9+
doc = fetch_semanticscholar("arXiv:1705.10311")
10+
assert doc.title == "Optimal Multi-Object Segmentation with Novel Gradient Vector Flow Based Shape Priors"
11+
12+
doc = fetch_semanticscholar("MAG:112218234")
13+
assert doc.title == "Schistosomus Reflexus Syndrome in Olive Ridley Sea Turtles ( Lepidochelys olivacea)"
14+
15+
doc = fetch_semanticscholar("ACL:W12-3903")
16+
assert doc.title == "The Study of Effect of Length in Morphological Segmentation of Agglutinative Languages"
17+
18+
doc = fetch_semanticscholar("PMID:19872477")
19+
assert doc.title == "THE COMBINATION OF GELATIN WITH HYDROCHLORIC ACID : II. NEW DETERMINATIONS OF THE ISOELECTRIC POINT AND COMBINING CAPACITY OF A PURIFIED GELATIN"
20+

0 commit comments

Comments
 (0)