Permalink
Please
sign in to comment.
Showing
with
28 additions
and 9 deletions.
- +5 −3 scholia/arxiv.py
- +1 −3 scholia/network.py
- +1 −1 scholia/text.py
- +17 −0 tests/test_arxiv.py
- +2 −2 tests/test_text.py
- +2 −0 tox.ini
@@ -0,0 +1,17 @@ | ||
"""Test scholia arxiv module.""" | ||
|
||
|
||
from scholia.arxiv import get_metadata | ||
|
||
|
||
def test_get_metadata(): | ||
"""Text for querying arxiv and metadata extration.""" | ||
metadata = get_metadata('1503.00759') | ||
assert metadata['title'] == ('A Review of Relational Machine Learning for ' | ||
'Knowledge Graphs') | ||
assert metadata['publication_date'] == '2015-09-28' | ||
assert metadata['doi'] == '10.1109/JPROC.2015.2483592' | ||
|
||
metadata = get_metadata('1803.04349') | ||
assert metadata['publication_date'] == '2018-03-05' | ||
assert metadata['full_text_url'] == "https://arxiv.org/pdf/1803.04349.pdf" |
@@ -1,11 +1,11 @@ | ||
"""Test scholia text module.""" | ||
|
||
|
||
from scholia.text import TextToTopicQText | ||
from scholia.text import load_text_to_topic_q_text | ||
|
||
|
||
def test_text_to_topic_q_text(): | ||
"""Test for class.""" | ||
text_to_topic_q_text = TextToTopicQText() | ||
text_to_topic_q_text = load_text_to_topic_q_text() | ||
qs = text_to_topic_q_text.text_to_topic_qs('brain') | ||
assert qs == ['Q1073'] |
0 comments on commit
a7a459c