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