summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-24 22:02:51 -0400
committerGitHub <noreply@github.com>2018-09-24 22:02:51 -0400
commit3c51b9f32d35c05847c302646575dab576430a01 (patch)
tree911473c26ca90e0b88084ca5889b180b438005e4 /tests/test_cmd2.py
parentc8890646d88fab3e07ccd71b30c2fed3785a7d5e (diff)
parent3a7dff372be39ef668a93f2cee9c40291f096521 (diff)
downloadcmd2-git-3c51b9f32d35c05847c302646575dab576430a01.tar.gz
Merge pull request #538 from python-cmd2/unit_tests
Fix pyscript related unit tests
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r--tests/test_cmd2.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 7a8a52a0..99c30af4 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -220,13 +220,13 @@ def test_base_run_pyscript(base_app, capsys, request):
out, err = capsys.readouterr()
assert out == expected
-def test_recursive_pyscript_not_allowed(base_app, capsys, request):
+def test_recursive_pyscript_not_allowed(base_app, request):
test_dir = os.path.dirname(request.module.__file__)
python_script = os.path.join(test_dir, 'scripts', 'recursive.py')
- expected = 'ERROR: Recursively entering interactive Python consoles is not allowed.\n'
+ expected = 'Recursively entering interactive Python consoles is not allowed.'
run_cmd(base_app, "pyscript {}".format(python_script))
- out, err = capsys.readouterr()
+ err = base_app._last_result.stderr
assert err == expected
def test_pyscript_with_nonexist_file(base_app, capsys):