Beispiel #1
0
 def testAdvanceTokenShouldReturnThreeWordWithOneFinalEnd(self):
     global tokenzier
     tokenizer=Tokenizer('a b c ')
     gen=tokenizer.advanceToken()
     a=next(gen)
     self.assertEqual(a,'a')
     b=next(gen)
     self.assertEqual(b,'b')
     c=next(gen)
     self.assertEqual(c,'c')
     d=next(gen)
     self.assertIsNone(d)