summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd2/cmd2.py2
-rw-r--r--tests/test_run_pyscript.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index d1dc87ff..b03e3280 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -3247,7 +3247,7 @@ class Cmd(cmd.Cmd):
expanded_filename = os.path.expanduser(filename)
if not expanded_filename.endswith('.py'):
- self.pwarning("'{}' does not appear to be a Python file".format(expanded_filename))
+ self.pwarning("'{}' does not have a .py extension".format(expanded_filename))
selection = self.select('Yes No', 'Continue to try to run it as a Python script? ')
if selection != 'Yes':
return
diff --git a/tests/test_run_pyscript.py b/tests/test_run_pyscript.py
index 374b2233..ded95225 100644
--- a/tests/test_run_pyscript.py
+++ b/tests/test_run_pyscript.py
@@ -50,7 +50,7 @@ def test_run_pyscript_with_non_python_file(base_app, request):
test_dir = os.path.dirname(request.module.__file__)
filename = os.path.join(test_dir, 'scripts', 'help.txt')
out, err = run_cmd(base_app, 'run_pyscript {}'.format(filename))
- assert "does not appear to be a Python file" in err[0]
+ assert "does not have a .py extension" in err[0]
def test_run_pyscript_with_exception(base_app, request):
test_dir = os.path.dirname(request.module.__file__)