tags: some clarification and new tests
This commit is contained in:
@@ -144,3 +144,20 @@ class TestTagLine(CmmTestCase):
|
||||
# Test case 9: 'tags_or' and 'tags_and' are None, match all tags except excluded tags
|
||||
tags_not = {Tag('tag2')}
|
||||
self.assertFalse(tagline.match_tags(None, None, tags_not))
|
||||
|
||||
# Test case 10: 'tags_or' and 'tags_and' are empty, match no tags
|
||||
self.assertFalse(tagline.match_tags(set(), set(), None))
|
||||
|
||||
# Test case 11: 'tags_or' is empty, match no tags
|
||||
self.assertFalse(tagline.match_tags(set(), None, None))
|
||||
|
||||
# Test case 12: 'tags_and' is empty, match no tags
|
||||
self.assertFalse(tagline.match_tags(None, set(), None))
|
||||
|
||||
# Test case 13: 'tags_or' is empty, match 'tags_and'
|
||||
tags_and = {Tag('tag1'), Tag('tag2')}
|
||||
self.assertTrue(tagline.match_tags(None, tags_and, None))
|
||||
|
||||
# Test case 14: 'tags_and' is empty, match 'tags_or'
|
||||
tags_or = {Tag('tag1'), Tag('tag2')}
|
||||
self.assertTrue(tagline.match_tags(tags_or, None, None))
|
||||
|
||||
Reference in New Issue
Block a user