def testFProb(self): c = Classifier(getwords) c.incc("Good") c.incf("hello", "Good") c.incc("Good") c.incf("world", "Good") c.incc("Good") c.incf("world", "Good") self.assertEqual(c.fprob("world", "Good"), 2.0/3.0)