class TestEmotion(unittest.TestCase): def setUp(self): self.c = Emotion(True) def testNegativeEmotion(self): self.assertTrue(self.c.classify(NEGATIVE_TWEET[0]) < 0.0) def testPositiveEmotion(self): self.assertTrue(self.c.classify(POSITIVE_TWEET[0]) > 0.0) def testNeutralEmotion(self): self.assertTrue(self.c.classify(NEUTRAL_TWEET[0]) == 0.0)
def setUp(self): self.c = Emotion(True)