diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-23 11:24:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-23 11:24:27 -0500 |
commit | 7ccc02d5e2d602791a7bf9df11ddb92fdb738a61 (patch) | |
tree | 30b863c991d635240617025ccc5ccdce5ca8f176 /cmd2.py | |
parent | 2154d8fb69820a0035ae1fe4d5abd981f0637e86 (diff) | |
parent | d24281ebe48ee9f2631645209e55bcb1e7f0b0ba (diff) | |
download | cmd2-git-7ccc02d5e2d602791a7bf9df11ddb92fdb738a61.tar.gz |
Merge pull request #54 from python-cmd2/doctest_gone
Doctest gone
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 30 |
1 files changed, 3 insertions, 27 deletions
@@ -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() |