def testREWB(self): """Regular Expression-based matching with Word Boundaries""" lines = 0 for l in logfilter(self.testset, blacklist=self.blacklist, field=1, delimiter="\t", with_acora=False, ignorecase=False, word_boundaries=True): #print l lines += 1 self.assertEquals(lines, self.exp_emitted_wb, "Number of lines emitted was not as expected: %s (Expected: %s)" % (lines, self.exp_emitted_wb))
def testAC(self): """Aho-Corasick-based matching""" lines = 0 for l in logfilter(self.testset, blacklist=self.blacklist, field=1, delimiter="\t", with_acora=True, ignorecase=False, word_boundaries=False): #print l lines += 1 self.assertEquals(lines, self.exp_emitted, "Number of lines emitted was not as expected: %s (Expected: %s)" % (lines, self.exp_emitted))