We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 645c086 commit 127e8aeCopy full SHA for 127e8ae
system_tests/language.py
@@ -115,3 +115,10 @@ def test_analyze_entities_from_blob(self):
115
document = Config.CLIENT.document_from_url(gcs_url)
116
entities = document.analyze_entities()
117
self._check_analyze_entities_result(entities)
118
+
119
+ def test_analyze_sentiment(self):
120
+ positive_msg = 'Jogging is fun'
121
+ document = Config.CLIENT.document_from_text(positive_msg)
122
+ sentiment = document.analyze_sentiment()
123
+ self.assertEqual(sentiment.polarity, 1)
124
+ self.assertTrue(0.5 < sentiment.magnitude < 1.5)
0 commit comments