Bug 1150497 - Make manifestparser tags whitespace (instead of comma) delimited to conform to other attributes, r=chmanchester

--HG--
extra : rebase_source : 2e64baefde7623d810cdd6dfe6f060792e2831bf
This commit is contained in:
Andrew Halberstadt 2015-04-02 09:50:30 -04:00
Родитель 95749abe54
Коммит 4b227980fa
2 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -312,6 +312,13 @@ class tags(InstanceFilter):
InstanceFilter's __eq__ method, so multiple instances can be added.
Multiple tag filters is equivalent to joining tags with the AND operator.
To define a tag in a manifest, add a `tags` attribute to a test or DEFAULT
section. Tests can have multiple tags, in which case they should be
whitespace delimited. For example:
[test_foobar.html]
tags = foo bar
:param tags: A tag or list of tags to filter tests on
"""
unique = False
@ -327,7 +334,7 @@ class tags(InstanceFilter):
if 'tags' not in test:
continue
test_tags = [t.strip() for t in test['tags'].split(',')]
test_tags = [t.strip() for t in test['tags'].split()]
if any(t in self.tags for t in test_tags):
yield test

Просмотреть файл

@ -102,7 +102,7 @@ class BuiltinFilters(unittest.TestCase):
{"name": "test4", "disabled": "some reason"},
{"name": "test5", "subsuite": "baz"},
{"name": "test6", "subsuite": "baz,foo == 'bar'"},
{"name": "test7", "tags": "foo, bar"},
{"name": "test7", "tags": "foo bar"},
)
def test_skip_if(self):