Esempio n. 1
0
 def test6(self):
     im = IntMatcher()
     
     for char in "before123between456after":
         im.feed(char)
     
     self.assertEqual(im.getvalue(),123 )
Esempio n. 2
0
 def test3(self):
     im = IntMatcher()
     
     for char in "123abc":
         im.feed(char)
     
     self.assertEqual(im.getvalue(),123 )
Esempio n. 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)
Esempio n. 4
0
 def test1(self):
     im = IntMatcher()
     
     for char in "123":
         s = im.feed(char)
         self.failUnless(s)