diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-23 21:00:32 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-23 21:00:32 -0400 |
commit | 99ec5265e2e80ecca1252670657c50693da5254a (patch) | |
tree | d06e75c15a981ee23e5a95f8c2bbbe694ea5c08c /tests/test_cmd2.py | |
parent | 5b8c80921a720122fc4e7f723ea712c640125412 (diff) | |
download | cmd2-git-99ec5265e2e80ecca1252670657c50693da5254a.tar.gz |
Fixed issue where run_pyscript failed if the script's filename had a space
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r-- | tests/test_cmd2.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index d4dbfe55..3f8c43b7 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -236,6 +236,7 @@ def test_base_shell(base_app, monkeypatch): assert out == [] assert m.called + def test_base_py(base_app): # Create a variable and make sure we can see it out, err = run_cmd(base_app, 'py qqq=3') @@ -263,17 +264,6 @@ def test_base_py(base_app): assert "NameError: name 'self' is not defined" in err -@pytest.mark.skipif(sys.platform == 'win32', - reason="Unit test doesn't work on win32, but feature does") -def test_py_run_script(base_app, request): - test_dir = os.path.dirname(request.module.__file__) - python_script = os.path.join(test_dir, 'script.py') - expected = 'This is a python script running ...' - - out, err = run_cmd(base_app, "py run('{}')".format(python_script)) - assert expected in out - - def test_base_error(base_app): out, err = run_cmd(base_app, 'meow') assert "is not a recognized command" in err[0] |