problem with boolean option

This commit is contained in:
2019-07-30 08:48:46 +02:00
parent e2c4e3381a
commit 504d5d71a4
2 changed files with 13 additions and 11 deletions

View File

@ -250,7 +250,7 @@ def test_readme_help_modif_short_remove(json):
optional arguments:
-h, --help show this help message and exit
-nv, --no-verbosity
-nv, --no-verbosity increase output verbosity
--str STR string option
"""
parser = TiramisuCmdlineParser(get_config(json), 'prog.py', display_modified_value=False)
@ -265,7 +265,7 @@ optional arguments:
assert f.getvalue() == output
def test_readme_help_modif_short_no(json):
def test_readme_help_modif_short_no1(json):
output = """usage: prog.py "str" -v [-h] [-v] [-nv] --str STR {str,list,int,none}
positional arguments:
@ -290,13 +290,12 @@ optional arguments:
def test_readme_help_modif_short_no_remove(json):
# FIXME -v -nv ?? c'est -nv qui est set
output = """usage: prog.py "str" -v [-h] [-nv] --str STR
output = """usage: prog.py "str" -v [-h] [-v] --str STR
optional arguments:
-h, --help show this help message and exit
-nv, --no-verbosity
--str STR string option
-h, --help show this help message and exit
-v, --verbosity increase output verbosity
--str STR string option
"""
parser = TiramisuCmdlineParser(get_config(json), 'prog.py', display_modified_value=False)
f = StringIO()