def test_exclude(self): pattern = TagPattern('#tag', exclude_attributes=['xxx']) self.assertTrue(pattern.match(self.column)) pattern = TagPattern('#tag', exclude_attributes=['foo']) self.assertFalse(pattern.match(self.column))
def test_simple(self): pattern = TagPattern('#tag') self.assertTrue(pattern.match(self.column)) pattern = TagPattern('#tagx') self.assertFalse(pattern.match(self.column))
def test_caseinsensitive(self): pattern = TagPattern('#Tag') self.assertTrue(pattern.match(self.column)) pattern = TagPattern('#tag', include_attributes=['fOO']) self.assertTrue(pattern.match(self.column))