There was an error while loading. Please reload this page.
1 parent e8b1b0f commit 6c4b6efCopy full SHA for 6c4b6ef
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