summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r--tests/test_cmd2.py7
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