add test to repro issue #955

This commit is contained in:
Jonathan Wren 2020-07-02 00:14:03 -07:00
parent f86d923843
commit 6f7c538cb1
3 changed files with 13 additions and 1 deletions

View file

@ -209,8 +209,13 @@ def run(context, command, cache_dir=None):
args = ushlex(command)
def _mock_editor(command):
context.editor_command = command
try:
with patch("sys.argv", args):
with patch("sys.argv", args), patch(
"subprocess.call", side_effect=_mock_editor
):
cli.run(args[1:])
context.exit_status = 0
except SystemExit as e: