def testYes(self): """ Test with an always true recognizer. """ manager = RecognizerManager([YesRecognizer()]) yeses, maybes = manager.processEntry(None, []) self.assertEqual(len(yeses), 1) self.assertEqual(maybes, [])
def testLazy(self): """ Test with a lazy recognizer. """ manager = RecognizerManager([LazyRecognizer()]) yeses, maybes = manager.processEntry(None, []) self.assertEqual(yeses, []) self.assertEqual(len(maybes), 1)
def testEmpty(self): """ Test that an entry w/out any recognizers is correctly processed. """ manager = RecognizerManager([]) yeses, maybes = manager.processEntry(None, []) self.assertEqual(yeses, []) self.assertEqual(maybes, [])