diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-24 13:32:06 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-24 13:32:06 -0400 |
commit | 29eeef6829fc7fc4a7e706d90871e8c347de773a (patch) | |
tree | b59fc95248a707e0c3ef69874cfccf24c9c5b392 | |
parent | b20bd6b3d14c20b5da669c919b5d19d728ba11ef (diff) | |
download | cmd2-git-29eeef6829fc7fc4a7e706d90871e8c347de773a.tar.gz |
Fixed unit test on Windows
-rw-r--r-- | tests/test_run_pyscript.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_run_pyscript.py b/tests/test_run_pyscript.py index 4c30d888..a4ff097f 100644 --- a/tests/test_run_pyscript.py +++ b/tests/test_run_pyscript.py @@ -59,11 +59,11 @@ def test_run_pyscript_with_odd_file_names(base_app): """ python_script = utils.quote_string('nothingweird.py') out, err = run_cmd(base_app, "run_pyscript {}".format(python_script)) - assert "No such file or directory: 'nothingweird.py'" in err[0] + assert "Error reading script file 'nothingweird.py'" in err[0] python_script = utils.quote_string('has spaces.py') out, err = run_cmd(base_app, "run_pyscript {}".format(python_script)) - assert "No such file or directory: 'has spaces.py'" in err[0] + assert "Error reading script file 'has spaces.py'" in err[0] # For remaining tests, mock input to get us passed the warning about not ending in .py input_mock = mock.MagicMock(name='input', return_value='1') @@ -71,11 +71,11 @@ def test_run_pyscript_with_odd_file_names(base_app): python_script = utils.quote_string('"is_double_quoted.py"') out, err = run_cmd(base_app, "run_pyscript {}".format(python_script)) - assert "No such file or directory: '\"is_double_quoted.py\"'" in err[1] + assert "Error reading script file '\"is_double_quoted.py\"'" in err[1] python_script = utils.quote_string("'is_single_quoted.py'") out, err = run_cmd(base_app, "run_pyscript {}".format(python_script)) - assert 'No such file or directory: "\'is_single_quoted.py\'"' in err[1] + assert "Error reading script file ''is_single_quoted.py''" in err[1] def test_run_pyscript_with_exception(base_app, request): test_dir = os.path.dirname(request.module.__file__) |