def test_match(self): # Assert search._match() wildcard matching. for s, p, b in (("rabbit", "rabbit", True), ("rabbits", "rabbit*", True), ("rabbits", "*abbits", True), ("rabbits", "*abbit*", True), ("rabbits", "rab*its", True), ("rabbits", re.compile(r"ra.*?"), True)): self.assertEqual(search._match(s, p), b) print "pattern.search._match()"
def test_match(self): # Assert search._match() wildcard matching. for s, p, b in ( ("rabbit", "rabbit", True), ("rabbits", "rabbit*", True), ("rabbits", "*abbits", True), ("rabbits", "*abbit*", True), ("rabbits", "rab*its", True), ("rabbits", re.compile(r"ra.*?"), True)): self.assertEqual(search._match(s, p), b) print "pattern.search._match()"