Skip to content

Commit 4b91f63

Browse files
committed
Changed warning text
1 parent 7991e51 commit 4b91f63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd2/cmd2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3247,7 +3247,7 @@ def py_run(filename: str):
32473247
expanded_filename = os.path.expanduser(filename)
32483248

32493249
if not expanded_filename.endswith('.py'):
3250-
self.pwarning("'{}' does not appear to be a Python file".format(expanded_filename))
3250+
self.pwarning("'{}' does not have a .py extension".format(expanded_filename))
32513251
selection = self.select('Yes No', 'Continue to try to run it as a Python script? ')
32523252
if selection != 'Yes':
32533253
return

tests/test_run_pyscript.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_run_pyscript_with_non_python_file(base_app, request):
5050
test_dir = os.path.dirname(request.module.__file__)
5151
filename = os.path.join(test_dir, 'scripts', 'help.txt')
5252
out, err = run_cmd(base_app, 'run_pyscript {}'.format(filename))
53-
assert "does not appear to be a Python file" in err[0]
53+
assert "does not have a .py extension" in err[0]
5454

5555
def test_run_pyscript_with_exception(base_app, request):
5656
test_dir = os.path.dirname(request.module.__file__)

0 commit comments

Comments
 (0)