summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.rst2
-rwxr-xr-xREADME.rst5
-rwxr-xr-xcmd2.py36
-rw-r--r--docs/alternatives.rst2
-rw-r--r--docs/conf.py37
-rw-r--r--docs/freefeatures.rst5
-rw-r--r--docs/hooks.rst10
-rw-r--r--docs/install.rst1
-rw-r--r--docs/overview.rst4
-rw-r--r--docs/pycon2010/pirate3.py1
-rw-r--r--docs/pycon2010/pirate4.py1
-rw-r--r--docs/pycon2010/pirate5.py1
-rw-r--r--docs/pycon2010/pirate6.py1
-rw-r--r--docs/pycon2010/pirate7.py1
-rw-r--r--docs/pycon2010/pirate8.py1
-rwxr-xr-xexamples/argparse_example.py6
-rwxr-xr-xexamples/event_loops.py4
-rwxr-xr-xexamples/example.py2
-rwxr-xr-xexamples/pirate.py2
-rw-r--r--examples/script.py4
-rw-r--r--examples/script_conditional.py2
-rw-r--r--fabfile.py3
-rwxr-xr-xsetup.py2
-rw-r--r--tests/conftest.py13
-rw-r--r--tests/script.py6
-rw-r--r--tests/test_cmd2.py6
-rw-r--r--tests/test_transcript.py1
27 files changed, 91 insertions, 68 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 26698251..a916435f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -2,7 +2,7 @@ News
====
0.7.1
-------
+-----
*Release date: TBD
diff --git a/README.rst b/README.rst
index 6db4843b..d36b3456 100755
--- a/README.rst
+++ b/README.rst
@@ -37,8 +37,8 @@ uninstalling cmd2.
.. _`Installation Instructions`: https://cmd2.readthedocs.io/en/latest/install.html
-The project is `maintained at GitHub`_. Bug reports may be submitted directly to the `issue tracker`_. Contributions
-are welcome, see the `Contributor's Guide`_ for more inforamation.
+Bug reports may be submitted directly to the `issue tracker`_. Pull Requests are welcome, see the
+`Contributor's Guide`_ for more information.
.. _`maintained at GitHub`: https://github.com/python-cmd2/cmd2
.. _`issue tracker`: https://github.com/python-cmd2/cmd2/issues
@@ -245,3 +245,4 @@ example/exampleSession.txt::
now: --->
---> say goodbye
goodbye
+
diff --git a/cmd2.py b/cmd2.py
index 6dcef5f9..085afc38 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -62,8 +62,8 @@ from six.moves import zip
# noinspection PyUnresolvedReferences
from six.moves.urllib.request import urlopen
-# Python 3 compatability hack due to no built-in file keyword in Python 3
-# Due to one occurence of isinstance(<foo>, file) checking to see if something is of file type
+# Python 3 compatibility hack due to no built-in file keyword in Python 3
+# Due to one occurrence of isinstance(<foo>, file) checking to see if something is of file type
try:
# noinspection PyUnboundLocalVariable,PyUnresolvedReferences
file
@@ -88,11 +88,11 @@ pyparsing.ParserElement.enablePackrat()
pyparsing.ParserElement.setDefaultWhitespaceChars(' \t')
-# The next 3 variables and associated setter funtions effect how arguments are parsed for commands using @options.
+# The next 3 variables and associated setter functions effect how arguments are parsed for commands using @options.
# The defaults are "sane" and maximize backward compatibility with cmd and previous versions of cmd2.
# But depending on your particular application, you may wish to tweak them so you get the desired parsing behavior.
-# Use POSIX or Non-POSIX (Windows) rules for splititng a command-line string into a list of arguments via shlex.split()
+# Use POSIX or Non-POSIX (Windows) rules for splitting a command-line string into a list of arguments via shlex.split()
POSIX_SHLEX = False
# Strip outer quotes for convenience if POSIX_SHLEX = False
@@ -143,7 +143,7 @@ class OptionParser(optparse.OptionParser):
def exit(self, status=0, msg=None):
"""Called at the end of showing help when either -h is used to show help or when bad arguments are provided.
- We override exit so it doesn't automatically exit the applicaiton.
+ We override exit so it doesn't automatically exit the application.
"""
self.values._exit = True
if msg:
@@ -190,7 +190,7 @@ def remaining_args(opts_plus_args, arg_list):
def _attr_get_(obj, attr):
"""Returns an attribute's value, or None (no error) if undefined.
- Analagous to .get() for dictionaries. Useful when checking for
+ Analogous to .get() for dictionaries. Useful when checking for
value of options that may not have been defined on a given
method."""
try:
@@ -209,7 +209,7 @@ def _which(editor):
def strip_quotes(arg):
""" Strip outer quotes from a string.
- Applies to both single and doulbe quotes.
+ Applies to both single and double quotes.
:param arg: str - string to strip outer quotes from
:return str - same string with potentially outer quotes stripped
@@ -268,7 +268,7 @@ def options(option_list, arg_desc="arg"):
First it does all of the option/argument parsing. Then it calls the underlying do_* method.
:param instance: cmd2.Cmd2 derived class application instance
- :param arg: str - command-line arguments provided to the comman
+ :param arg: str - command-line arguments provided to the command
:return: bool - returns whatever the result of calling the underlying do_* method would be
"""
try:
@@ -354,7 +354,7 @@ if sys.platform == "win32":
except ImportError:
# noinspection PyUnusedLocal
def get_paste_buffer(*args):
- """For Windows OSes without the appropriate libary installed to get text from clipboard, raise an exception.
+ """For Windows OSes without the appropriate library installed to get text from clipboard, raise an exception.
"""
raise OSError(pastebufferr % ('pywin32', 'Download from http://sourceforge.net/projects/pywin32/'))
@@ -475,7 +475,7 @@ class StubbornDict(dict):
def update(self, arg):
"""Adds dictionary arg's key-values pairs in to dict
- :param arg: an object convertable to a StubbornDict
+ :param arg: an object convertible to a StubbornDict
"""
dict.update(self, StubbornDict.to_dict(arg))
@@ -518,7 +518,7 @@ class StubbornDict(dict):
def stubborn_dict(*arg, **kwarg):
- """ Factory function which creates instances of the StubornDict class.
+ """ Factory function which creates instances of the StubbornDict class.
:param arg: an argument which could be used to construct a built-in dict dictionary
:param kwarg: a variable number of key/value pairs
@@ -600,7 +600,7 @@ class Cmd(cmd.Cmd):
terminators = [';']
urlre = re.compile('(https?://[-\\w./]+)')
- # Attributes which ARE dynamicaly settable at runtime
+ # Attributes which ARE dynamically settable at runtime
abbrev = True # Abbreviated commands recognized
autorun_on_edit = True # Should files automatically run after editing (doesn't apply to commands)
case_insensitive = True # Commands recognized regardless of case
@@ -709,7 +709,7 @@ class Cmd(cmd.Cmd):
err = self.colorize("ERROR: {}\n".format(errmsg), 'red')
sys.stderr.write(err)
else:
- err = "EXCEPTION of type '{}' occured with message: '{}'\n".format(exception_type, errmsg)
+ err = "EXCEPTION of type '{}' occurred with message: '{}'\n".format(exception_type, errmsg)
sys.stderr.write(self.colorize(err, 'red'))
if traceback_war:
@@ -728,7 +728,7 @@ class Cmd(cmd.Cmd):
def colorize(self, val, color):
"""Given a string (``val``), returns that string wrapped in UNIX-style
special characters that turn on (and then off) text color and style.
- If the ``colors`` environment paramter is ``False``, or the application
+ If the ``colors`` environment parameter is ``False``, or the application
is running on Windows, will return ``val`` unchanged.
``color`` should be one of the supported strings (or styles):
red/blue/green/cyan/magenta, bold, underline"""
@@ -1032,7 +1032,7 @@ class Cmd(cmd.Cmd):
"""Gets the method name associated with a given command.
If self.abbrev is False, it is always just looks for do_arg. However, if self.abbrev is True,
- it allows abbreivated command names and looks for any commands which start with do_arg.
+ it allows abbreviated command names and looks for any commands which start with do_arg.
:param arg: str - command to look up method name which implements it
:return: str - method name which implements the given command
@@ -1053,8 +1053,8 @@ class Cmd(cmd.Cmd):
If the command provided doesn't exist, then it executes _default() instead.
- :param line: ParsedString - subclass of string inclding the pyparsing ParseResults
- :return: bool - a flag indicating whether the interpretatoin of commands should stop
+ :param line: ParsedString - subclass of string including the pyparsing ParseResults
+ :return: bool - a flag indicating whether the interpretation of commands should stop
"""
statement = self.parsed(line)
self.lastcmd = statement.parsed.raw
@@ -1071,7 +1071,7 @@ class Cmd(cmd.Cmd):
def _default(self, statement):
"""Executed when the command given isn't a recognized command implemented by a do_* method.
- :param statement: ParsedString - subclass of string inclding the pyparsing ParseResults
+ :param statement: ParsedString - subclass of string including the pyparsing ParseResults
:return:
"""
arg = statement.full_parsed_statement()
diff --git a/docs/alternatives.rst b/docs/alternatives.rst
index 3587b749..bf1545d6 100644
--- a/docs/alternatives.rst
+++ b/docs/alternatives.rst
@@ -50,4 +50,4 @@ allowing a good experience for end users. If you are seeking a visually richer
mind investing more development time, we would recommend checking out `Python Prompt Toolkit`_.
In the future, we may investigate options for incorporating the usage of `Python Prompt Toolkit`_ and/or Click_ into
-``cmd2`` applicaitons.
+``cmd2`` applications.
diff --git a/docs/conf.py b/docs/conf.py
index 0627f94c..60a28d13 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,29 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-#
-# cmd2 documentation build configuration file, created by
-# sphinx-quickstart on Wed Feb 10 12:05:28 2010.
-#
-# This file is execfile()d with the current directory set to its
-# containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
+"""
+cmd2 documentation build configuration file, created by
+sphinx-quickstart on Wed Feb 10 12:05:28 2010.
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#
+This file is execfile()d with the current directory set to its
+containing dir.
+
+Note that not all possible configuration values are present in this
+autogenerated file.
+
+All configuration values have a default; values that are commented out
+serve to show the default.
+
+If extensions (or modules to document with autodoc) are in another directory,
+add these directories to sys.path here. If the directory is relative to the
+documentation root, use os.path.abspath to make it absolute, like shown here.
+"""
import os
import sys
-sys.path.insert(0, os.path.abspath('..'))
-
# Import for custom theme from Read the Docs
import sphinx_rtd_theme
+sys.path.insert(0, os.path.abspath('..'))
+
+
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
diff --git a/docs/freefeatures.rst b/docs/freefeatures.rst
index ddde62ca..44ade408 100644
--- a/docs/freefeatures.rst
+++ b/docs/freefeatures.rst
@@ -67,7 +67,7 @@ quotation marks if it is more than a one-word command.
If you wish to disable cmd2's consumption of command-line arguments, you can do so by setting the ``allow_cli_args``
attribute of your ``cmd2.Cmd`` class instance to ``False``. This would be useful, for example, if you wish to use
- someting like Argparse_ to parse the overall command line arguments for your application::
+ something like Argparse_ to parse the overall command line arguments for your application::
from cmd2 import Cmd
class App(Cmd):
@@ -278,7 +278,7 @@ expressions.
.. note::
- If you have set ``allow_cli_args`` to False in order to disable parsing of command line arguments at invocaiton,
+ If you have set ``allow_cli_args`` to False in order to disable parsing of command line arguments at invocation,
then the use of ``-t`` or ``--test`` to run transcript testing is automatically disabled. In this case, you can
alternatively provide a value for the optional ``transcript_files`` when constructing the instance of your
``cmd2.Cmd`` derived class in order to cause a transcript test to run::
@@ -290,3 +290,4 @@ expressions.
if __name__ == '__main__':
app = App(transcript_files=['exampleSession.txt'])
app.cmdloop()
+
diff --git a/docs/hooks.rst b/docs/hooks.rst
index 3849cce0..02f44274 100644
--- a/docs/hooks.rst
+++ b/docs/hooks.rst
@@ -1,7 +1,7 @@
.. cmd2 documentation for application and command lifecycle and the hooks which are available
-cmd2 Application Lifecyle and Hooks
-===================================
+cmd2 Application Lifecycle and Hooks
+====================================
The typical way of starting a cmd2 application is as follows::
@@ -25,14 +25,14 @@ The ``preloop`` and ``postloop`` methods run before and after the main loop, res
Application Lifecycle Attributes
--------------------------------
-There are numerous attributes (member variables of the ``cmd2.Cmd``) which have a signficiant effect on the applicaiton
+There are numerous attributes (member variables of the ``cmd2.Cmd``) which have a significant effect on the application
behavior upon entering or during the main loop. A partial list of some of the more important ones is presented here:
- **intro**: *str* - if provided this serves as the intro banner printed once at start of application, after ``preloop`` runs
- **allow_cli_args**: *bool* - if True (default), then searches for -t or --test at command line to invoke transcript testing mode instead of a normal main loop
and also processes any commands provided as arguments on the command line just prior to entering the main loop
- **echo**: *bool* - if True, then the command line entered is echoed to the screen (most useful when running scripts)
-- **prompt**: *str* - sets the prompt which is displayed, can be dynamically changed based on applicatoin state and/or
+- **prompt**: *str* - sets the prompt which is displayed, can be dynamically changed based on application state and/or
command results
@@ -44,7 +44,7 @@ Inside the main loop, every time the user hits <Enter> the line is processed by
.. automethod:: cmd2.Cmd.onecmd_plus_hooks
As the ``onecmd_plus_hooks`` name implies, there are a number of *hook* methods that can be defined in order to inject
-applicaiton-specific behavior at various points during the processing of a line of text entered by the user. ``cmd2``
+application-specific behavior at various points during the processing of a line of text entered by the user. ``cmd2``
increases the 2 hooks provided by ``cmd`` (**precmd** and **postcmd**) to 6 for greater flexibility. Here are
the various hook methods, presented in chronological order starting with the ones called earliest in the process.
diff --git a/docs/install.rst b/docs/install.rst
index dae100a9..78b330fc 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -122,3 +122,4 @@ Uninstalling cmd2
If you wish to permanently uninstall ``cmd2``, this can also easily be done with pip_::
pip uninstall cmd2
+
diff --git a/docs/overview.rst b/docs/overview.rst
index 9e7a315a..75b8caa9 100644
--- a/docs/overview.rst
+++ b/docs/overview.rst
@@ -20,8 +20,8 @@ differs from cmd_.
The `cmd.emptyline() <https://docs.python.org/3/library/cmd.html#cmd.Cmd.emptyline>`_ function is called
when an empty line is entered in response to the prompt. By default, in cmd_ if this method is not overridden, it
repeats and executes the last nonempty command entered. However, no end user we have encountered views this as
- expected or desirable default behavior. Thus, the default behvior in ``cmd2`` is to simply go to the next line
+ expected or desirable default behavior. Thus, the default behavior in ``cmd2`` is to simply go to the next line
and issue the prompt again. At this time, cmd2 completely ignores empty lines and the base class cmd.emptyline()
- method never gets called and thus the emptyline() behavior cannot be overriden.
+ method never gets called and thus the emptyline() behavior cannot be overridden.
.. _cmd: https://docs.python.org/3/library/cmd.html
diff --git a/docs/pycon2010/pirate3.py b/docs/pycon2010/pirate3.py
index ecc70f3f..46f26501 100644
--- a/docs/pycon2010/pirate3.py
+++ b/docs/pycon2010/pirate3.py
@@ -6,6 +6,7 @@ from cmd import Cmd
class Pirate(Cmd):
gold = 3
+ initial_gold = gold
def do_loot(self, arg):
'Seize booty from a passing ship.'
diff --git a/docs/pycon2010/pirate4.py b/docs/pycon2010/pirate4.py
index a4e4816d..ae1e1f4b 100644
--- a/docs/pycon2010/pirate4.py
+++ b/docs/pycon2010/pirate4.py
@@ -6,6 +6,7 @@ from cmd import Cmd
class Pirate(Cmd):
gold = 3
+ initial_gold = gold
def do_loot(self, arg):
'Seize booty from a passing ship.'
diff --git a/docs/pycon2010/pirate5.py b/docs/pycon2010/pirate5.py
index 2167c7f4..68da88a5 100644
--- a/docs/pycon2010/pirate5.py
+++ b/docs/pycon2010/pirate5.py
@@ -6,6 +6,7 @@ from cmd import Cmd
class Pirate(Cmd):
gold = 3
+ initial_gold = gold
def do_loot(self, arg):
'Seize booty from a passing ship.'
diff --git a/docs/pycon2010/pirate6.py b/docs/pycon2010/pirate6.py
index a90c2b52..bd5f5fe2 100644
--- a/docs/pycon2010/pirate6.py
+++ b/docs/pycon2010/pirate6.py
@@ -6,6 +6,7 @@ from cmd2 import Cmd
class Pirate(Cmd):
gold = 3
+ initial_gold = gold
prompt = 'arrr> '
def default(self, line):
diff --git a/docs/pycon2010/pirate7.py b/docs/pycon2010/pirate7.py
index a333070c..799f73ed 100644
--- a/docs/pycon2010/pirate7.py
+++ b/docs/pycon2010/pirate7.py
@@ -6,6 +6,7 @@ from cmd2 import Cmd
class Pirate(Cmd):
gold = 3
+ initial_gold = gold
prompt = 'arrr> '
def default(self, line):
diff --git a/docs/pycon2010/pirate8.py b/docs/pycon2010/pirate8.py
index 55d6df5c..58b56208 100644
--- a/docs/pycon2010/pirate8.py
+++ b/docs/pycon2010/pirate8.py
@@ -6,6 +6,7 @@ from cmd2 import Cmd, options, make_option
class Pirate(Cmd):
gold = 3
+ initial_gold = gold
prompt = 'arrr> '
def default(self, line):
diff --git a/examples/argparse_example.py b/examples/argparse_example.py
index 8f833578..c6cc819b 100755
--- a/examples/argparse_example.py
+++ b/examples/argparse_example.py
@@ -3,7 +3,7 @@
"""A sample application for cmd2 showing how to use Argparse to process command line arguments for your application.
It doubles as an example of how you can still do transcript testing even if allow_cli_args is false.
-Thanks to cmd2's built-in transtript testing capability, it also serves as a test suite for argparse_example.py when
+Thanks to cmd2's built-in transcript testing capability, it also serves as a test suite for argparse_example.py when
used with the exampleSession.txt transcript.
Running `python argparse_example.py -t exampleSession.txt` will run all the commands in the transcript against
@@ -77,11 +77,11 @@ if __name__ == '__main__':
if args.ip:
ip_addr = args.ip
- transcript = None
+ transcripts = None
if args.test:
transcripts = [args.test]
- # Instantiate your cmd2 applicaiton
+ # Instantiate your cmd2 application
c = CmdLineApp(transcript_files=transcripts)
# And run your cmd2 application
diff --git a/examples/event_loops.py b/examples/event_loops.py
index e3e5880c..24efa830 100755
--- a/examples/event_loops.py
+++ b/examples/event_loops.py
@@ -10,6 +10,7 @@ import cmd2
class Cmd2EventBased(cmd2.Cmd):
+ """Basic example of how to run cmd2 without it controlling the main loop."""
def __init__(self):
cmd2.Cmd.__init__(self)
@@ -20,7 +21,8 @@ if __name__ == '__main__':
app = Cmd2EventBased()
app.preloop()
- # Do this within whatever event loop mechanism you wish to run a single command
+ # Do this within whatever event loop mechanism you wish to run a single command.
+ # In this case, no prompt is generated, so you need to provide one and read the user's input.
app.onecmd_plus_hooks("help history")
app.postloop()
diff --git a/examples/example.py b/examples/example.py
index f39be5de..cb4aba04 100755
--- a/examples/example.py
+++ b/examples/example.py
@@ -2,7 +2,7 @@
# coding=utf-8
"""A sample application for cmd2.
-Thanks to cmd2's built-in transtript testing capability, it also serves as a test suite for example.py when used with
+Thanks to cmd2's built-in transcript testing capability, it also serves as a test suite for example.py when used with
the exampleSession.txt transcript.
Running `python example.py -t exampleSession.txt` will run all the commands in the transcript against example.py,
diff --git a/examples/pirate.py b/examples/pirate.py
index 03745ed4..4fd7e6be 100755
--- a/examples/pirate.py
+++ b/examples/pirate.py
@@ -62,7 +62,7 @@ class Pirate(Cmd):
self.gold -= 1
def do_quit(self, arg):
- """Quit the applicaiton gracefully."""
+ """Quit the application gracefully."""
print("Quiterrr!")
return True
diff --git a/examples/script.py b/examples/script.py
index 7d0c998a..3f60c8fb 100644
--- a/examples/script.py
+++ b/examples/script.py
@@ -1,3 +1,7 @@
#!/usr/bin/env python
+# coding=utf-8
+"""
+Trivial example of a Python script which can be run inside a cmd2 application.
+"""
print("This is a python script running ...")
diff --git a/examples/script_conditional.py b/examples/script_conditional.py
index cbfb0494..3964ab6d 100644
--- a/examples/script_conditional.py
+++ b/examples/script_conditional.py
@@ -1,6 +1,6 @@
# coding=utf-8
"""
-This is a Python script intended to be used with the "python_scripting.py" cmd2 example applicaiton.
+This is a Python script intended to be used with the "python_scripting.py" cmd2 example application.
To run it you should do the following:
./python_scripting.py
diff --git a/fabfile.py b/fabfile.py
index 50c0e911..52345929 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -1,3 +1,4 @@
+# coding=utf-8
from fabric.api import env, task, local
import os
import errno
@@ -93,7 +94,7 @@ def release():
release_check()
clean()
build()
- print "Releasing", env.projname, "version", env.version
+ print("Releasing", env.projname, "version", env.version)
local("git tag %s" % env.version)
local("python setup.py sdist upload")
local("git push --tags")
diff --git a/setup.py b/setup.py
index fb7a9590..58505a0a 100755
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ Drop-in replacement adds several features for command-prompt tools:
* `py` enters interactive Python console
* test apps against sample session transcript (see examples/example.py)
-Useable without modification anywhere cmd is used; simply import cmd2.Cmd in place of cmd.Cmd.
+Usable without modification anywhere cmd is used; simply import cmd2.Cmd in place of cmd.Cmd.
"""
CLASSIFIERS = list(filter(None, map(str.strip,
diff --git a/tests/conftest.py b/tests/conftest.py
index 8bc11497..6f3131e7 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,9 +1,10 @@
# coding=utf-8
-#
-# Cmd2 unit/functional testing
-#
-# Copyright 2016 Federico Ceratto <federico.ceratto@gmail.com>
-# Released under MIT license, see LICENSE file
+"""
+Cmd2 unit/functional testing
+
+Copyright 2016 Federico Ceratto <federico.ceratto@gmail.com>
+Released under MIT license, see LICENSE file
+"""
import sys
from pytest import fixture
@@ -83,7 +84,7 @@ timing: False # Report execution times
class StdOut(object):
- """ Toy class for replacing self.stdout in cmd2.Cmd instances fror unit testing. """
+ """ Toy class for replacing self.stdout in cmd2.Cmd instances for unit testing. """
def __init__(self):
self.buffer = ''
diff --git a/tests/script.py b/tests/script.py
index 30d45960..5195b8cc 100644
--- a/tests/script.py
+++ b/tests/script.py
@@ -1,2 +1,6 @@
#!/usr/bin/env python
-print("This is a python script running ...") \ No newline at end of file
+# coding=utf-8
+"""
+Trivial example of a Python script which can be run inside a cmd2 application.
+"""
+print("This is a python script running ...")
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 0f1328f3..99409d46 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -75,7 +75,7 @@ def test_base_set_not_supported(base_app, capsys):
run_cmd(base_app, 'set qqq True')
out, err = capsys.readouterr()
expected = normalize("""
-EXCEPTION of type 'LookupError' occured with message: 'Parameter 'qqq' not supported (type 'show' for list of parameters).'
+EXCEPTION of type 'LookupError' occurred with message: 'Parameter 'qqq' not supported (type 'show' for list of parameters).'
To enable full traceback, run the following command: 'set debug true'
""")
assert normalize(str(err)) == expected
@@ -446,12 +446,12 @@ def test_base_colorize(base_app):
def _expected_no_editor_error():
expected_exception = 'OSError'
- # If using Python 2 or PyPy (either 2 or 3), expect a differen excpetion than with Python 3
+ # If using Python 2 or PyPy (either 2 or 3), expect a different exception than with Python 3
if six.PY2 or hasattr(sys, "pypy_translation_info"):
expected_exception = 'EnvironmentError'
expected_text = normalize("""
-EXCEPTION of type '{}' occured with message: 'Please use 'set editor' to specify your text editing program of choice.'
+EXCEPTION of type '{}' occurred with message: 'Please use 'set editor' to specify your text editing program of choice.'
To enable full traceback, run the following command: 'set debug true'
""".format(expected_exception))
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index 6b229862..c0966d03 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -32,6 +32,7 @@ class CmdLineApp(Cmd):
opts = [make_option('-p', '--piglatin', action="store_true", help="atinLay"),
make_option('-s', '--shout', action="store_true", help="N00B EMULATION MODE"),
make_option('-r', '--repeat', type="int", help="output [n] times")]
+
@options(opts, arg_desc='(text to say)')
def do_speak(self, arg, opts=None):
"""Repeats what you tell me to."""