Commit b67a1ec4 authored by Emmanuel Garette's avatar Emmanuel Garette

add test for longargument property

parent eeca0743
......@@ -597,3 +597,15 @@ def test_readme_list_uniq_tree_flatten():
parser = TiramisuCmdlineParser(config, 'prog.py', fullpath=False)
parser.parse_args(['list', '--list', 'a'])
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment