def testOne(self):
     """ It says maybe whatever it reads. """
     rec = LazyRecognizer()
     rec.consume(None)
     self.assertEqual(rec.state, RecognizerStates.MAYBE_YES)
     self.assertEqual(len(rec.evidence), 1)
     self.assertEqual(len(rec.info), 0)
     rec.consume(None)
     self.assertEqual(rec.state, RecognizerStates.MAYBE_YES)
     self.assertEqual(len(rec.evidence), 1)
     self.assertEqual(len(rec.info), 0)
    def testCopy(self):
        """ Test that copy really resets. """
        rec = LazyRecognizer()
        rec.consume(None)
        self.assertEqual(rec.state, RecognizerStates.MAYBE_YES)
        self.assertEqual(len(rec.evidence), 1)
        self.assertEqual(len(rec.info), 0)

        rec2 = rec.initializeNew()
        self.assertEqual(rec2.state, RecognizerStates.NO)
        self.assertEqual(rec2.evidence, [])
        self.assertEqual(len(rec2.info), 0)

        self.assertEqual(rec, rec2)
        self.assertFalse(rec != LazyRecognizer())