diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cmd2.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 1bdbea5f..9ce02789 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -331,6 +331,12 @@ def test_run_script_with_binary_file(base_app, request): out, err = run_cmd(base_app, 'run_script {}'.format(filename)) assert "is not an ASCII or UTF-8 encoded text file" in err[0] +def test_run_script_with_python_file(base_app, request): + test_dir = os.path.dirname(request.module.__file__) + filename = os.path.join(test_dir, 'pyscript', 'stop.py') + out, err = run_cmd(base_app, 'run_script {}'.format(filename)) + assert "appears to be a Python file" in err[0] + def test_run_script_with_utf8_file(base_app, request): test_dir = os.path.dirname(request.module.__file__) filename = os.path.join(test_dir, 'scripts', 'utf8.txt') |