diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-02-17 11:39:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-17 11:39:50 -0500 |
commit | 729e152c525bc30d36f130f8dc8442aeb00d1de8 (patch) | |
tree | 25f9041650716c5be91926da39af0b0ebaca853f /tests/test_run_pyscript.py | |
parent | 013b9e0a2c75e17f8aa0e0f7cbe50d84d2f657d8 (diff) | |
parent | 555db5d98fc122dc21d3bb239c079d68272cc0c3 (diff) | |
download | cmd2-git-729e152c525bc30d36f130f8dc8442aeb00d1de8.tar.gz |
Merge pull request #888 from python-cmd2/pyscript_fixes
pyscript fixes
Diffstat (limited to 'tests/test_run_pyscript.py')
-rw-r--r-- | tests/test_run_pyscript.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test_run_pyscript.py b/tests/test_run_pyscript.py index d717758c..811fd688 100644 --- a/tests/test_run_pyscript.py +++ b/tests/test_run_pyscript.py @@ -117,10 +117,9 @@ def test_run_pyscript_stop(base_app, request): stop = base_app.onecmd_plus_hooks('run_pyscript {}'.format(python_script)) assert stop -def test_run_pyscript_run(base_app, request): +def test_run_pyscript_environment(base_app, request): test_dir = os.path.dirname(request.module.__file__) - python_script = os.path.join(test_dir, 'pyscript', 'run.py') - expected = 'I have been run' + python_script = os.path.join(test_dir, 'pyscript', 'environment.py') + out, err = run_cmd(base_app, 'run_pyscript {}'.format(python_script)) - out, err = run_cmd(base_app, "run_pyscript {}".format(python_script)) - assert expected in out + assert out[0] == "PASSED" |