summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-02-23 11:24:27 -0500
committerGitHub <noreply@github.com>2017-02-23 11:24:27 -0500
commit7ccc02d5e2d602791a7bf9df11ddb92fdb738a61 (patch)
tree30b863c991d635240617025ccc5ccdce5ca8f176 /cmd2.py
parent2154d8fb69820a0035ae1fe4d5abd981f0637e86 (diff)
parentd24281ebe48ee9f2631645209e55bcb1e7f0b0ba (diff)
downloadcmd2-git-7ccc02d5e2d602791a7bf9df11ddb92fdb738a61.tar.gz
Merge pull request #54 from python-cmd2/doctest_gone
Doctest gone
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py30
1 files changed, 3 insertions, 27 deletions
diff --git a/cmd2.py b/cmd2.py
index 05ec46d6..acc7a69b 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -28,7 +28,6 @@ Git repository on GitHub at https://github.com/python-cmd2/cmd2
import cmd
import copy
import datetime
-import doctest
import glob
import optparse
import os
@@ -1816,29 +1815,6 @@ class Cmd2TestCase(unittest.TestCase):
if __name__ == '__main__':
- doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE)
-
- # NOTE: The doctest expected values work with Python 2.7, but are a bit off for Python 3.x.
-
-'''
-To make your application transcript-testable, replace
-
-::
-
- app = MyApp()
- app.cmdloop()
-
-with
-
-::
-
- app = MyApp()
- cmd2.run(app)
-
-Then run a session of your application and paste the entire screen contents
-into a file, ``transcript.test``, and invoke the test like::
-
- python myapp.py --test transcript.test
-
-Wildcards can be used to test against multiple transcript files.
-'''
+ # If run as the main application, simply start a bare-bones cmd2 application with only built-in functionality.
+ app = Cmd()
+ app.cmdloop()