Compare commits

...

1 Commits

Author SHA1 Message Date
Gerda Shank
bfc9707195 Add description attribute to SelectorDefinition [#2800] 2020-11-02 16:36:19 -05:00
2 changed files with 3 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ from typing import List, Dict, Any, Union
class SelectorDefinition(JsonSchemaMixin):
name: str
definition: Union[str, Dict[str, Any]]
description: str = ''
@dataclass

View File

@@ -96,11 +96,13 @@ def test_parse_simple():
sf = parse_file('''\
selectors:
- name: tagged_foo
description: Selector for foo-tagged models
definition:
tag: foo
''')
assert len(sf.selectors) == 1
assert sf.selectors[0].description == 'Selector for foo-tagged models'
parsed = cli.parse_from_selectors_definition(sf)
assert len(parsed) == 1
assert 'tagged_foo' in parsed