diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-08-22 17:45:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 17:45:34 -0700 |
commit | d5f91bd490aac11180644c5549dc340826901fb2 (patch) | |
tree | d44878dbf9f33261e3022e7a057e65ba540848e9 /tests/test_cmd2.py | |
parent | 6ff0def7c35a29031ac3ca7e8ba580e971633c6c (diff) | |
parent | 3a842abbd2e6511b2721ead634c14b076ac3b362 (diff) | |
download | cmd2-git-d5f91bd490aac11180644c5549dc340826901fb2.tar.gz |
Merge branch 'master' into fix/transcript_regexes
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r-- | tests/test_cmd2.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 96bfd22f..10631ffa 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 "{}"'.format(filename)) # We think we have an editor, so should expect a system call m.assert_called_once_with('"{}" "{}"'.format(base_app.editor, filename)) @@ -911,7 +911,10 @@ def test_default_to_shell_unknown(shell_app): def test_default_to_shell_good(capsys): app = cmd2.Cmd() app.default_to_shell = True - line = 'ls' + if sys.platform.startswith('win'): + line = 'dir' + else: + line = 'ls' statement = app.parser_manager.parsed(line) retval = app.default(statement) assert not retval |