From cb41e731ea433b7041dd60b8c9408f9346b15de1 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 3 Apr 2019 07:55:19 +0200 Subject: [PATCH] add test for longargument property --- test/test_readme.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_readme.py b/test/test_readme.py index d551326..083d127 100644 --- a/test/test_readme.py +++ b/test/test_readme.py @@ -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