Skip to content

Commit f33c3cd

Browse files
authored
Add tests for sentiment prediction function
1 parent a058bd6 commit f33c3cd

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎tests/test_sentiment_prediction.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from nlp_model.sentiment_model import predict_sentiment
2+
3+
4+
def test_positive_sentiment():
5+
result = predict_sentiment("I am very happy today")
6+
assert result == "positive"
7+
8+
9+
def test_negative_sentiment():
10+
result = predict_sentiment("This is a terrible product")
11+
assert result == "negative"
12+
13+
14+
def test_neutral_sentiment():
15+
result = predict_sentiment("I am going to the market")
16+
assert result == "neutral"

0 commit comments

Comments
 (0)