예제 #1
0
 def test6(self):
     im = IntMatcher()
     
     for char in "before123between456after":
         im.feed(char)
     
     self.assertEqual(im.getvalue(),123 )
예제 #2
0
 def test3(self):
     im = IntMatcher()
     
     for char in "123abc":
         im.feed(char)
     
     self.assertEqual(im.getvalue(),123 )
예제 #3
0
 def test5(self):
     im = IntMatcher()
     
     for char in "before":
         s = im.feed(char)
         self.failIf(s)
     
     for char in "123":
         s = im.feed(char)
         self.failUnless(s)
     
     for char in "after":
         s = im.feed(char)
         self.failIf(s)
     
     for char in "456":
         s = im.feed(char)
         self.failIf(s)
예제 #4
0
 def test1(self):
     im = IntMatcher()
     
     for char in "123":
         s = im.feed(char)
         self.failUnless(s)