mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-07 16:56:13 +02:00
fix argument parsing for test suite
This commit is contained in:
parent
b5c671c055
commit
2522582b5d
2 changed files with 14 additions and 6 deletions
|
@ -166,10 +166,12 @@ def run(context, command, cache_dir=None):
|
|||
cache_dir = os.path.join("features", "cache", cache_dir)
|
||||
command = command.format(cache_dir=cache_dir)
|
||||
|
||||
args = ushlex(command)[1:]
|
||||
args = ushlex(command)
|
||||
|
||||
try:
|
||||
cli.run(args or None)
|
||||
context.exit_status = 0
|
||||
with patch('sys.argv', args):
|
||||
cli.run(args[1:])
|
||||
context.exit_status = 0
|
||||
except SystemExit as e:
|
||||
context.exit_status = e.code
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue