Compare commits

...

2 commits

Author SHA1 Message Date
9befbf0ade bump: version 0.7.0a2 → 0.7.0a3 2025-10-10 08:10:15 +02:00
c4ce6dfb3f fix: update test 2025-10-10 08:00:30 +02:00
4 changed files with 16 additions and 6 deletions

View file

@ -1,3 +1,13 @@
## 0.7.0a3 (2025-10-10)
### Feat
- do not exit() with exit_on_error to False
### Fix
- update test
## 0.7.0a2 (2025-09-29)
### Fix

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "tiramisu_cmdline_parser"
version = "0.7.0a2"
version = "0.7.0a3"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "command-line parser using Tiramisu"

View file

@ -873,17 +873,17 @@ def test_readme_longargument(json):
def test_readme_unknown_key(json):
output1 = """usage: prog.py [-h] [-v] [-nv] {str,list,int,none}
output1 = """usage: prog.py "list" -v --list "a" [-h] [-v] [-nv] --list LIST [LIST ...] {str,list,int,none}
prog.py: error: unrecognized arguments: --unknown
"""
output2 = """usage: prog.py [-h] [-v] [-nv] {str,list,int,none}
output2 = """usage: prog.py "list" -v --list "a" [-h] [-v] [-nv] --list LIST [LIST ...] {str,list,int,none}
prog.py: error: unrecognized arguments: --root.unknown
"""
parser = TiramisuCmdlineParser(get_config(json, True), 'prog.py', fullpath=False, formatter_class=TestHelpFormatter)
f = StringIO()
with redirect_stderr(f):
try:
parser.parse_args(['--unknown'])
parser.parse_args(['list', '--list', 'a', '--v', '--unknown'])
except SystemExit as err:
assert str(err) == "2"
else:
@ -893,7 +893,7 @@ prog.py: error: unrecognized arguments: --root.unknown
f = StringIO()
with redirect_stderr(f):
try:
parser.parse_args(['--root.unknown'])
parser.parse_args(['list', '--list', 'a', '--v', '--root.unknown'])
except SystemExit as err:
assert str(err) == "2"
else:

View file

@ -1 +1 @@
__version__ = "0.7.0a2"
__version__ = "0.7.0a3"