diff options
| author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-23 10:10:00 -0500 |
|---|---|---|
| committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-23 10:10:00 -0500 |
| commit | 59a6a7923330fffd957303706655d36bb79b9b94 (patch) | |
| tree | 9ce8bbbc2c5624014948c91a39dc98764caf7938 | |
| parent | 2154d8fb69820a0035ae1fe4d5abd981f0637e86 (diff) | |
| download | cmd2-git-59a6a7923330fffd957303706655d36bb79b9b94.tar.gz | |
Removed inclusion and use of doctest since all doctests converted to pytest.
Since all doctests were converted to pytest unit tests in a previous commmit, this commit just removes the inclusion and usage of doctest. Now if cmd2.py is run as a main application, it just starts a bare-bones cmd2.Cmd() application with only built-in functionality instead of running the doctests which no longer exist.
| -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() |
