Skip to content

Commit dd6e0cf

Browse files
committed
fix sentiment analysis related tests
1 parent 079fb46 commit dd6e0cf

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

tests/test_graph_extraction.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ def test_basic_graph_extraction(tokens: List[str]):
6464
lists(sampled_from(string.ascii_uppercase), min_size=1),
6565
integers(min_value=1, max_value=5),
6666
)
67-
def test_dynamic_graph_extraction(tokens: List[str], dynamic_window: int):
67+
def test_dynamic_co_occurrences_graph_extraction(
68+
tokens: List[str], dynamic_window: int
69+
):
6870
"""
6971
.. note::
7072
@@ -95,7 +97,7 @@ def test_polarity_extraction(tokens: List[str]):
9597
out = graph_extractor(
9698
set(characters),
9799
sentences=[tokens],
98-
sentences_polarities=[1.0],
100+
sentence_polarities=[1.0],
99101
)
100102

101103
for character1, character2 in itertools.combinations(characters, 2):

tests/test_sentiment_analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def test_polarity():
88
# text is not used, only sentences
99
out_dict = sentiment_analyzer(sentences=[pos_sent, neg_sent])
1010

11-
pos_polarity = out_dict["sentences_polarities"][0]
12-
neg_polarity = out_dict["sentences_polarities"][1]
11+
pos_polarity = out_dict["sentence_polarities"][0]
12+
neg_polarity = out_dict["sentence_polarities"][1]
1313
assert pos_polarity >= 0
1414
assert neg_polarity <= 0

0 commit comments

Comments
 (0)