summaryrefslogtreecommitdiff
path: root/tests/test_run_pyscript.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2020-02-20 20:36:33 -0700
committerkotfu <kotfu@kotfu.net>2020-02-20 20:36:33 -0700
commitf0c3cbffa35dfe26b8ac54ea1450ed50ba787c9a (patch)
tree03b0e85aaaccc0706caf5658446dda0a5a13cd9f /tests/test_run_pyscript.py
parent1e57b0c451de23338378f44088118648848cc82c (diff)
parent22de85832e877b5b360eeacd4b71e00f69bf00e1 (diff)
downloadcmd2-git-f0c3cbffa35dfe26b8ac54ea1450ed50ba787c9a.tar.gz
Merge branch 'master' into api_docs
# Conflicts: # CHANGELOG.md # cmd2/__init__.py # cmd2/decorators.py # docs/api/utility_functions.rst
Diffstat (limited to 'tests/test_run_pyscript.py')
-rw-r--r--tests/test_run_pyscript.py9
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"