add test for longargument property
This commit is contained in:
parent
132d57a4c6
commit
cb41e731ea
1 changed files with 12 additions and 0 deletions
|
@ -597,3 +597,15 @@ def test_readme_list_uniq_tree_flatten():
|
||||||
parser = TiramisuCmdlineParser(config, 'prog.py', fullpath=False)
|
parser = TiramisuCmdlineParser(config, 'prog.py', fullpath=False)
|
||||||
parser.parse_args(['list', '--list', 'a'])
|
parser.parse_args(['list', '--list', 'a'])
|
||||||
assert config.value.dict() == output
|
assert config.value.dict() == output
|
||||||
|
|
||||||
|
|
||||||
|
def test_readme_longargument():
|
||||||
|
output = {'cmd': 'list',
|
||||||
|
'list': ['a'],
|
||||||
|
'verbosity': True,
|
||||||
|
'v': True}
|
||||||
|
config = get_config()
|
||||||
|
config.option('verbosity').property.add('longargument')
|
||||||
|
parser = TiramisuCmdlineParser(config, 'prog.py')
|
||||||
|
parser.parse_args(['list', '--list', 'a', '--v'])
|
||||||
|
assert config.value.dict() == output
|
||||||
|
|
Loading…
Reference in a new issue