From ce40bc4dd8484c2de9eb32671df515b0d567dd4f Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Mon, 21 Aug 2017 12:50:22 -0400 Subject: Converted edit command to an @options command for the better argument parsing related to spaces and quotes The recent change of edit to allow spaces means that it can benefit from the better argument parsing cmd2 has for commands implemented using the @options decorator. --- tests/test_cmd2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 96bfd22f..11af8657 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -751,7 +751,7 @@ def test_edit_file_with_spaces(base_app, request, monkeypatch): test_dir = os.path.dirname(request.module.__file__) filename = os.path.join(test_dir, 'my commands.txt') - run_cmd(base_app, 'edit {}'.format(filename)) + run_cmd(base_app, 'edit {!r}'.format(filename)) # We think we have an editor, so should expect a system call m.assert_called_once_with('"{}" "{}"'.format(base_app.editor, filename)) -- cgit v1.2.1