mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-08-12 11:40:34 +08:00
Updated tests
This commit is contained in:
@@ -16,11 +16,11 @@ class FullAPIRun(unittest.TestCase):
|
|||||||
self.assertEqual(political_set, set(response.keys()))
|
self.assertEqual(political_set, set(response.keys()))
|
||||||
|
|
||||||
def test_posneg(self):
|
def test_posneg(self):
|
||||||
posneg_set = set(['Sentiment'])
|
|
||||||
test_string = "Worst song ever."
|
test_string = "Worst song ever."
|
||||||
response = sentiment(test_string)
|
response = sentiment(test_string)
|
||||||
|
|
||||||
self.assertTrue(isinstance(response, float))
|
self.assertTrue(isinstance(response, float))
|
||||||
|
self.assertTrue(response < 0.5)
|
||||||
|
|
||||||
def test_good_fer(self):
|
def test_good_fer(self):
|
||||||
fer_set = set(['Angry', 'Sad', 'Neutral', 'Surprise', 'Fear', 'Happy'])
|
fer_set = set(['Angry', 'Sad', 'Neutral', 'Surprise', 'Fear', 'Happy'])
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ class FullAPIRun(unittest.TestCase):
|
|||||||
self.assertEqual(political_set, set(response.keys()))
|
self.assertEqual(political_set, set(response.keys()))
|
||||||
|
|
||||||
def test_posneg(self):
|
def test_posneg(self):
|
||||||
posneg_set = set(['Sentiment'])
|
|
||||||
test_string = "Worst song ever."
|
test_string = "Worst song ever."
|
||||||
response = sentiment(test_string)
|
response = sentiment(test_string)
|
||||||
|
|
||||||
self.assertTrue(isinstance(response, float))
|
self.assertTrue(isinstance(response, float))
|
||||||
|
self.assertTrue(response < 0.5)
|
||||||
|
|
||||||
def test_good_fer(self):
|
def test_good_fer(self):
|
||||||
fer_set = set(['Angry', 'Sad', 'Neutral', 'Surprise', 'Fear', 'Happy'])
|
fer_set = set(['Angry', 'Sad', 'Neutral', 'Surprise', 'Fear', 'Happy'])
|
||||||
|
|||||||
Reference in New Issue
Block a user