Beispiel #1
0
 def test_regex_findall_bad_input(self):
     matches = regex_findall(r".*", None)
     self.assertEquals(matches, [])
     matches = regex_findall(r".*", [])
     self.assertEquals(matches, [])
     matches = regex_findall(r".*", 1)
     self.assertEquals(matches, [])
Beispiel #2
0
 def test_regex_findall_miss(self):
     test_s = u"\n".join(
         ['this is only a test', 'there are only two lines'])
     test_fo = StringIO(test_s)
     matches = regex_findall(r".*not_there$", test_fo)
     self.assertEquals(matches, [])