Exemplo n.º 1
0
 def test6(self):        
     anm = AlphaNumMatcher()
     
     for char in ";@#$abcd1234efgh5678":
         anm.feed(char)
         
     self.assertEqual(anm.getvalue(), "abcd1234efgh5678")
Exemplo n.º 2
0
 def test4(self):        
     anm = AlphaNumMatcher()
     
     for char in "1234":
         anm.feed(char)
     
     self.assertEqual(anm.getvalue(), "1234")
Exemplo n.º 3
0
 def test7(self):        
     anm = AlphaNumMatcher()
     
     for char in " ;!@#$%^&*()\/?[]{}+=-~`'\"|.,":
         s = anm.feed(char)
         self.failIf(s)
     
     for char in "abcd1234":
         s = anm.feed(char)
         self.failUnless(s)
     
     for char in " ;!@#$%^&*()\/?[]{}+=-~`'\"|.,":
         s = anm.feed(char)
         self.failIf(s)
Exemplo n.º 4
0
 def test3(self):        
     anm = AlphaNumMatcher()
     
     for char in " ;!@#$%^&*()\/?[]{}+=-~`'\"|.,":
         s = anm.feed(char)
         self.failIf(s)
Exemplo n.º 5
0
 def test2(self):        
     anm = AlphaNumMatcher()
     
     for char in "1234":
         s = anm.feed(char)
         self.failUnless(s)
Exemplo n.º 6
0
 def test1(self):        
     anm = AlphaNumMatcher()
     
     for char in "abcd":
         s = anm.feed(char)
         self.failUnless(s)